Problem/Motivation
Steps to reproduce:
- Create Content Basic Page
- Create view for content, type Basic Page, give it a link 'list'
- Manually add a link to the tool menu with the url '/list'
- Choose link 'list', the view will show, the link will go active
- In the console, run 'drush cr'.
- Reload the page, the 'list' link is not active anymore!
- Executing 'Clear cache' or editing/saving the view will restore correct behavior
The work around is to define the menu in views as 'Normal Menu Entry' and add it to the desired menu.
The same thing happens with links to views with contextual filters. There is no workaround for this case. See also #1163868: Menu position doesn't get set for Views with contextual filters
These problems do NOT occur in Drupal 8.1.10.
Comments
Comment #2
berdirLooks like this is caused by drush and can be fixed there: https://github.com/drush-ops/drush/pull/2393. Didn't check with this problem yet, but it solves my user/login user/logout visibility problem and I strongly suspect it's the same problem as this.
But something changed in core that this now breaks like this, so we should possibly protect better against this.
Comment #3
berdirOne possible indicator for the problem that's specific to /user/login is that 8.2 has a user.login.http route for REST/json authentication. But I even tried removing that route and it still failed.
Comment #4
cgalli commentedAfter installing the latest dev of Drush (9.0-dev-g0018c4d), the problem disappears. The active link is still correctly marked after cache rebuild with drush.
What change in core 8.2. triggered this problem remains unclear.
Comment #9
larowlanFixed in drush