Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
rel module flattens out the $form['options'] space so $form['options']['status'] becomes just $form['status'] etc.
This is a huge problem because many contrib modules depend on this $form['options'][...] format , modules that depend on this structure arent able to inject their data into the form.
for example
publishcontent.module: $form['options']['status']['#access'] = TRUE;
override_node_options.module: $form['options']['status']['#access'] = user_access('override ' . $node->type . ' published option');
etc etc etc...
the attached patch reinstates $form['option'] after rebuilding the form, everything then seems to work as normal with rel+displaysuite.
Comment | File | Size | Author |
---|---|---|---|
#1 | rel-options_structure-1481396-1.patch | 1.03 KB | tanc |
rel-options-structure.patch | 919 bytes | dgtlmoon | |
Comments
Comment #1
tancI was seeing notice errors on forms managed by rel which aren't node forms and therefore don't have options so I've wrapped the patch in isset checks. Maybe this isn't the way to do it?
Comment #2
rooby CreditAttribution: rooby commentedThis should help for modules that are just inserting new elements into options but what about modules that just modify elements that already exist in there, like the override node options module, which doesn't work properly when you have moved node options out of their home.
Comment #3
phenaproxima#1: rel-options_structure-1481396-1.patch queued for re-testing.
Comment #4
rogical CreditAttribution: rogical commentedSome elements does be very important as modules never think they will be decomposed, I'm thinking we should preserve some elements as important, users would get warning on selecting them.
Comment #5
rogical CreditAttribution: rogical commented#1889036: Mark/preserve elements may lead error with other modules
Comment #6
rogical CreditAttribution: rogical commentedcommitted.