In Drupal 8: Open the overlay and click the + (or -) icon next to a page title to add (or remove) it from the shortcuts. Then look at the shortcuts tab in the toolbar and notice it has not been updated for your changes. This is very confusing. You have to end your overlay session by closing the overlay in order to see it.

This is less noticeable in Drupal 8 than it would be in Drupal 7 because the shortcuts are hidden away where you can't see them, but there are issues open to fix that in Drupal 8. Overall, therefore, seems like a major bug to me.

CommentFileSizeAuthor
#1 overlay-refresh-1991008-1.patch604 bytesDavid_Rothstein

Comments

David_Rothstein’s picture

Status: Active » Needs work
Issue tags: +Needs backport to D7
StatusFileSize
new604 bytes

Part 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.

David_Rothstein’s picture

Title: Regression: Adding or removing a shortcut while inside the overlay doesn't update the shortcuts in the toolbar » Regression: Adding/removing a shortcut (or otherwise changing the toolbar) while inside the overlay doesn't update the toolbar

Changing 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.

dcam’s picture

http://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.

nod_’s picture

Version: 8.x-dev » 7.x-dev
Issue summary: View changes

Overlay is dead to D8 #2088121: Remove Overlay.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.