Problem/Motivation
- Add a view, expose a menu item and place it in the Main navigation.
- Go edit the Main navigation menu, save the page.
- The views menu item is now gone.
- Go back to edit the view, it will say the view is invalid, and the menu item is half-broken.
Found at Drupalaton 2014 training.
Proposed resolution
Do not remove the views menu item in this case.
Remaining tasks
Do it. Tests.
User interface changes
None.
API changes
Likely none.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff.txt | 3.61 KB | dawehner |
| #9 | menu-2318435-9.patch | 11.98 KB | dawehner |
| #7 | interdiff.txt | 973 bytes | gábor hojtsy |
| #7 | menu-2318435-7.patch | 8.81 KB | gábor hojtsy |
| #3 | menu-2318435-3.patch | 8.14 KB | dawehner |
Comments
Comment #1
gábor hojtsyComment #2
wim leersThe solution for this is probably identical to that in the interdiff at #2301317-50: MenuLinkNG part4: Conversion.
Comment #3
dawehnerThis will interfere with #2202493: views_menu_link_defaults() does not set a parent for links but just partly
Comment #4
gábor hojtsyLooks good. On a quick look this may need config schema changes as well :)
Comment #5
dawehnerYou are absolute right!
Comment #7
gábor hojtsyYeah there was still one schema change missing and the file view was not changed yet.
Comment #9
dawehnerFixed the remaining failures, stupid me.
On top of that there is now a test which ensures that the menu link still appears in the block.
Comment #10
gábor hojtsyYay! The new tests look good.
Are we using this array syntax now?!
Comment #11
gábor hojtsyThe fix looks good. @dawehner said we use such square bracket syntax elsewhere as well. https://www.drupal.org/coding-standards#array says nothing about this array syntax not allowed, or the keyword version required.
Comment #12
alexpottCommitted 455428c and pushed to 8.0.x. Thanks!