- Issue created by @gun_dose
When some form is rendered in block, for example views exposed filter form or custom block plugin that renders some form, all attributes, that are set to form by $form['#attributes'] are moved from form to block level. Actually it affects all render arrays in blocks, but in my case it is especially signifacant for forms. After update ro 5.0.0-rc1 some forms become unstyled. And also it is very signifacant to have attributes on forms, if you are going to add some custom js functionality to forms. I made an investigation and found that attributes are removed here:
https://git.drupalcode.org/project/context/-/blob/8.x-4.x/src/Plugin/Con...
foreach (['#attributes', '#contextual_links'] as $property) {
if (isset($content[$property])) {
$build[$property] += $content[$property];
unset($content[$property]);
}
}
Skip processing for forms. Seems that initially it was added to inprove contextual links behavior, but forms usually don't have contextual links.
Apply patch
No
No
No
Active
5.0
Code