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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tanc’s picture

Status: Active » Needs review
FileSize
1.03 KB

I 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?

rooby’s picture

This 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.

phenaproxima’s picture

rogical’s picture

Status: Needs review » Reviewed & tested by the community

Some 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.

rogical’s picture

rogical’s picture

Status: Reviewed & tested by the community » Fixed

committed.

Status: Fixed » Closed (fixed)

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