Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
overlay.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 May 2013 at 13:57 UTC
Updated:
27 Nov 2013 at 07:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
David_Rothstein commentedPart 1 of the bug is that as a result of #1911178: Remove hook_exit(), the code in the Overlay module which handles the change detection isn't getting called. When you add or remove a shortcut, that page requests ends with a drupal_goto(), which doesn't trigger a response event. It is possible #1668866: Replace drupal_goto() with RedirectResponse will fix this.
Rolling back #1911178: Remove hook_exit() still doesn't make it work though. That's because jQuery is throwing a "Syntax error, unrecognized expression" error when the overlay runs $() on the new content from the server before dynamically adding it to the page. I am not sure exactly why it's choking, but it's likely related to the jQuery fix for http://www.openwall.com/lists/oss-security/2013/01/31/3 (see also http://drupal.org/SA-CORE-2013-001).
If so, that means this bug will likely occur in Drupal 7 too, in the case of a site which has updated to a newer version of jQuery than shipped with core. But I haven't tested.
The fix for the second part should (in theory) be easy; see the attached patch. The jQuery replaceWith() method does not require a jQuery object; it accepts strings just fine. Trying the equivalent change on Drupal 7, it continues to work fine. However, for some reason Drupal 8 is exploding here; the toolbar tries to refresh after adding a shortcut but winds up looking completely broken (again, this is with the attached patch plus a rollback of #1911178: Remove hook_exit() applied). I have no idea why. My guess is that it was a preexisting bug (perhaps toolbar-specific) that is only now revealed with these other bugs fixed.
Comment #2
David_Rothstein commentedChanging title to reflect that this isn't limited to adding/removing shortcuts; it will be an issue for anything done inside the overlay that affects the content of the toolbar.
Adding/removing a shortcut is just the easiest way to trigger it.
Comment #3
dcam commentedhttp://drupal.org/node/1427826 contains instructions for updating the issue summary with the summary template.
The summary may need to be updated with information from comments.
Comment #4
nod_Overlay is dead to D8 #2088121: Remove Overlay.