- π·π΄Romania oana.hulpoi
I confirm that this patch fixes the issue on Drupal 9.5.9.
When trying to set part of an overridden display's configuration, the user ends up with broken configuration.
Steps to reproduce:
Expected result:
Display A's filters are set as default. Display A no longer uses overridden filters.
Actual result:
Display A uses the filters of the default display. Display A no longer uses overridden filters.
This means, that upon saving the view, A's filters are lost irreversibly.
If both the default and the overridden display used filters of the same names, this will be hard to spot and lead to confusion and possibly errors later on, as filter values are changed behind the scenes. If A used additional filters, these will all be changed to "Broken handler".
The "Use as default" behavior effectively duplicates the "Revert to default" behavior, with the added bonus of unexpectedly altering the view. This broken behavior has been around for quite a while, and also happened in D7 (see https://www.drupal.org/node/2313791 β ).
Upon closer inspection, it seems that views_ui never actually passes the display's configuration to the default display, even though the code comments state it does. So we have to properly implement this de-override behavior.
Write tests to reproduce, review suggested patch.
Needs work
11.0 π₯
Last updated
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
I confirm that this patch fixes the issue on Drupal 9.5.9.