Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Reproduce
- Enable ief and paragraphs
- Create new paragraph foo
- Add required, single value, entity reference field to content type page
- Use IEF Simple Widget for that field in form display
- Connect paragraph with article and use preview as "edit mode" in paragraph widget
- Add node with one paragraph
- Save node
- Edit node and try to add a further paragraph
Recoverable fatal error: Argument 4 passed to Drupal\Core\Field\WidgetBase::setWidgetState() must be of the type array, null given, called in modules/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormSimple.php on line 166 and defined in Drupal\Core\Field\WidgetBase::setWidgetState() (line 459 of /Users/christianfritsch/repositories/drupal/core/lib/Drupal/Core/Field/WidgetBase.php).
Comment | File | Size | Author |
---|---|---|---|
#36 | ief_simple_widget_not-2722097-36.patch | 4.17 KB | johnchque |
#36 | ief_simple_widget_not-2722097-36-test-only.patch | 3.15 KB | johnchque |
#36 | interdiff-2722097-17-36.txt | 6.07 KB | johnchque |
#17 | ief_simple_widget_not-2722097-17_TEST_ONLY.patch | 4.56 KB | chr.fritsch |
#17 | ief_simple_widget_not-2722097-17.patch | 5.59 KB | chr.fritsch |
Comments
Comment #2
miro_dietikerThis issue was referenced in #2708033-13: Edit modes "closed" and "preview" choke on invalid entity references
As it's committed, we should be able to fix it easily. We still need additional test coverage.
Comment #3
chr.fritschI've made a patch and a test to show the issue
Comment #5
chr.fritschMoved issue into paragraphs module, because the issue have to be fixed there
Comment #7
chr.fritschComment #10
chr.fritschAdd a test dependency
Comment #13
chr.fritschAnd again...
Comment #16
BerdirThe test dependency patch needs to be a standalone patch that does nothing but that, so that it can be committed separately.
Are you sure you are using the latest version? your patch doesn't apply and I think we recently made some changes about exactly something like this.
Comment #17
chr.fritschThe issue still occurs with latest dev. So here is a new patch
Comment #20
chr.fritschComment #21
chr.fritschComment #35
johnchqueI will try to fix the tests.
Comment #36
johnchqueFixed tests. Tried to use ParagraphsTestBase. :)
Comment #40
miro_dietikerGreat, yeah this limitation to edit is important.
Comment #43
brooke_heaton CreditAttribution: brooke_heaton as a volunteer commentedI'm getting this error again after the latest Paragraphs update :(