Problem/Motivation

When anyone besides User 1 tries to load /ad/add/offer, they get a white screen and the following error comes up in reports/dblog:

TypeError: Return value of Drupal\smallads\Plugin\Field\FieldType\ScopeItem::smalladsDefaultScope() must be of the type int, array returned in Drupal\smallads\Plugin\Field\FieldType\ScopeItem::smalladsDefaultScope() (line 71 of /var/www/html/okhighlandtrades/web/modules/smallads/src/Plugin/Field/FieldType/ScopeItem.php)

I'm not sure if this is related, but on reports/status it says:

ENTITY/FIELD DEFINITIONS
Mismatched entity and/or field definitions
The following changes were detected in the entity type and field definitions.
Smallad
The Visibility field needs to be updated.

Steps to reproduce

Oddly, there is no issue when user 1 posts ads.
I double-checked the permissions, and everyone should be able to create smallads.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

amysragbag created an issue. See original summary.

matslats’s picture

Status: Active » Fixed

Fixed in HEAD

amysragbag’s picture

Perfect! Thank you.

I think when I run composer run-script update-cforge it reverts the changes I've made in profiles/cforge/composer.jason? So I may have thought I had HEAD when I didn't actually.

matslats’s picture

The bug that that script is working around, should now be fixed but it means I have to re-arrange and test some things.
Yes i can imaging that the cforge-update script might overwrite some other things.
In which case I imagine it should fix if you run composer update --no-dev again.

amysragbag’s picture

Ok thank you =)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.