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:
Since erl_restriction uses its own field type, we are confronted with the problem that if we want to use the module for existing projects, it is difficult to migrate the data. We need to migrate all data form the entity_reference_layout field to the the new erl_restriction field, for all content types using entity_reference_layout.
Proposed solution:
It would be nice if we could set the restrictions in a widget for the entity_reference_layout field instead of using a new type. It would make it a lot easier to use the module for projects that already use entity_reference_layout.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-5.txt | 2.15 KB | dermario |
#5 | erl_restriction-use_widget_settings-3086766-5.patch | 5.93 KB | dermario |
#2 | erl_restriction-use_widget_settings-3086766-2.patch | 5.71 KB | waluigi |
Comments
Comment #2
waluigi CreditAttribution: waluigi at Unic commentedThanks for the proposal, this is a great idea.
I created a patch where you have to choose the allowed paragraph types in the widget settings instead of the field settings. As you described it, you now can simply select the other widget and afterwards all the allowed paragraphs.
I would appreciate of someone could quickly test it as well.
Comment #3
dermarioComment #4
InaW CreditAttribution: InaW at Unic commented@waluigi Thanks for your great work. I tested your patch #2 and it seems to work fine. I enabled the widget on an existing entity_reference_layout field and was able to successfully restrict the paragraphs per layout.
In the comments below I listed some small code improvements, that should be fixed.
Indentation seems to be wrong
Comment description is missing
This TODO is obsolete
Comment #5
dermarioI performed the code cleanups mentioned in #4 and fixed some more findings.
Comment #6
Silent-Murmur CreditAttribution: Silent-Murmur at Unic commentedI checked it and it looks fine for me now.
Comment #7
Silent-Murmur CreditAttribution: Silent-Murmur at Unic commentedComment #9
dermarioCommitted and pushed, thanks to all.