Updated: Comment #N
Problem/Motivation
Like many other places in core shortcut_preprocess_page() relies on menu_get_item() to work, so on route only pages
the add/remove link right beside the page title does not work.
Proposed resolution
Remaining tasks
User interface changes
API changes
Related Issues
#2078583: menu callbacks removed from hook_menu do not display any menus
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | interdiff.txt | 586 bytes | mr.baileys |
| #15 | 2081963-15-shortcut-route-only-pages.patch | 3.18 KB | mr.baileys |
| #12 | 2081963-12-shortcut-route-only-pages.patch | 3.18 KB | mr.baileys |
| #12 | interdiff.txt | 846 bytes | mr.baileys |
| #4 | 2081963-4-shortcut-route-only-pages.patch | 3.36 KB | mr.baileys |
Comments
Comment #1
dawehnerHere is a patch.
Comment #2
pwolanin commentedCan you list some example pages where this can be verified? Looking at a local install it seems like all are working in Severn and none in Bartik.
Comment #3
dawehnerYes this link is not shown by bartik, so on route only pages this bug will never be visible.
To reproduce the bug, just set seven as default theme and go to the usual router_test/test2 page.
Here is a test for that.
Comment #3.0
dawehnerUpdated issue summary.
Comment #4
mr.baileysassertFalse(!empty())toassertTrue(empty())for legibility.Comment #5
dawehnerOh I like those changes! Sadly I can't really RTBC it.
Comment #6
tim.plunkettThis seems like a problem still.
Comment #7
mr.baileysCurrent behaviour is the same as it is in Drupal 7.x: the "Add to shortcuts" icon/link is shown on access denied, but not on page not found.
It does not make sense to display the icon/link on a 403 page, but this patch does not alter the current behaviour, so I think it is best to tackle this in a separate issue (especially since determining whether or not the page is a 403/404 in
shortcut_preprocess_page()seems non-trivial according to #1969270: 403/404 pages: drupal_get_http_header('Status') returns no status code at all)?Comment #8
dawehnerMarked as critical as it blocks #2177041: Remove all implementations of hook_menu
Comment #9
berdirReally marking as critical :)
Comment #10
berdirDo we really still need this?
Comment #11
alexpottI can't see
_legacybeing set anywhere so it does look superflous.Comment #12
mr.baileys"_legacy" was removed in #2106709: Remove legacy router backward compatibility layer
Rerolled without _legacy-support.
Comment #13
berdirThanks, thought so, back to RTBC then.
Comment #14
catch/me shudders but already did that on #2095959: Remove instances of menu_get_object('node'), not the fault of this patch.
Very nitpicky but why not just !empty($item['access'])?
Comment #15
mr.baileys1. will be addressed as part of #2124749: [meta] Stop using $request->attributes->get(MAGIC_KEY) as a public API
2. Fixed
new patch attached.
Comment #16
berdirYes, looks better, RTBC unless testbot disagrees (he better not! ;))
Comment #18
alexpott15: 2081963-15-shortcut-route-only-pages.patch queued for re-testing.
Comment #20
catch15: 2081963-15-shortcut-route-only-pages.patch queued for re-testing.
Comment #21
mr.baileysPassed testing, so back to RTBC
Comment #22
catchCommitted/pushed to 8.x, thanks!