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/Motivation
In the views page display there is a menu creation option. For the Normal Menu Entry, there is no expanded field. Which means you can only set the Menu Item's expanded status via the menu item page. Which works until you run cache-rebuild at which point it is reset to FALSE.
Proposed resolution
Patch attached, adds expanded field to the views UI/yml settings files. Editing works both ways (ie View <-> Menu Item) and no data is lost on cache clearing.
Also a couple extra asserts added to test that expanded and description are properly being set.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#11 | views_page_display_menu-2598488-11.patch | 4.36 KB | NickDickinsonWilde |
#11 | views_page_display_menu-2598488-11-testonly.patch | 1.55 KB | NickDickinsonWilde |
Comments
Comment #2
NickDickinsonWildeComment #5
NickDickinsonWildeoops missed config. Test note: this only tests that it is initially set correctly, should I also do a test to confirm that it is properly changed (ie one of the problems discussed in this patch).
Comment #6
NickDickinsonWildeComment #9
NickDickinsonWildehmmph! used some 0/1 rather than T/F so schema didn't like it for BOOL values.
Comment #11
NickDickinsonWildeseriously! too many uploads of the same patches! (in the test had a _> instead of a ->).
Comment #12
NickDickinsonWildeComment #14
NickDickinsonWildeComment #15
dawehnerNice test coverage expension
Comment #16
dawehnerThis sounds like data loss for me and due to that critical
Comment #17
catchYes consistent data-loss triggered from the UI should be treated as critical.
Patch looks great to me, so committed/pushed to 8.0.x, thanks!