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.
Hello,
thanks for the work! Loving this module.
Steps to reproduce:
1. Create 2 content types
2. Make one content type reference the other using entity reference
3. Go to the reference field's "Manage Form Display" Page and select "Inline entity form - Single value" and save.
4. Go ahead and create a node of the referencing content type.
5. Notice that no reference field widget is displayed.
Comment | File | Size | Author |
---|---|---|---|
#6 | inline_entity_form-fix-single-test_5.patch | 58.42 KB | woprrr |
Comments
Comment #1
webiator GmbH CreditAttribution: webiator GmbH commentedComment #2
woprrr CreditAttribution: woprrr as a volunteer commentedYep ! I confirm this !! Inline_entity_form work only in multiple value mode.
I'll take a look this. I suspect a problem in retrieving form elements.
Comment #3
woprrr CreditAttribution: woprrr as a volunteer commentedOK !! It's "normal"
The function formElement() is not set in InlineEntityFormSingle class.
I think this issue join this https://www.drupal.org/node/2489230.
Because the contents of the form will be the same in the end. It does not just have the opportunity to set a higher value 1 in the setting of the widget. And this is already the case in the configuration
The final definition of the elements will be the same as multiple I think. (Feel free to tell me if I'm wrong).
--------Test------
Apply the test patch file in this issue, Singlewidget does works.
Conclusion !
It is not the fix for this issue, but an example. We must define what should be displayed in the single case or not . Single and Multiple define whether have the same form Elements or if the configuration widget which prevents add more items ?
It takes little thinking be if two widgets are still useful in the sense that with multiple it is possible to make a widget set has one value, it becomes a single one ... Make widget also solves the issue of refactoring that I ' I propose to the other end and simplifies the structure !
I wait your reactions :)
Comment #4
woprrr CreditAttribution: woprrr as a volunteer commentedComment #5
woprrr CreditAttribution: woprrr as a volunteer commentedComment #6
woprrr CreditAttribution: woprrr as a volunteer commentedReload the patch with last version of IEF.
Comment #7
webiator GmbH CreditAttribution: webiator GmbH commentedThe widget is now the same as for multiple values widget. The patch works though
Comment #8
woprrr CreditAttribution: woprrr as a volunteer commentedClose the benefit of a more suitable outcome @see https://www.drupal.org/node/2491527#comment-9940087
I need you brutzelspeck :)
Thanks for your job .