Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When using drupal_goto, external URLs are displayed within the overlay's iframe. I found a workaround (see this example), but it seems like the overlay should handle this.
Comment | File | Size | Author |
---|---|---|---|
#7 | overlay_goto-1152314-6-before.png | 61.59 KB | andymartha |
#6 | overlay_goto-1152314-6.patch | 741 bytes | univate |
#6 | overlaytest.tar_.gz | 725 bytes | univate |
#1 | overlay_goto.patch | 582 bytes | grendzy |
Comments
Comment #1
grendzy CreditAttribution: grendzy commentedThis approach may short-circuit any hook_drupal_goto_alters() with a lower weight, but that seems unavoidable. We could use hook_exit instead, but we'd have the same problem.
Comment #2
David_Rothstein CreditAttribution: David_Rothstein commentedHm, I think the existing client-side code is supposed to take care of breaking out of the overlay in these cases (see
Drupal.overlay.loadChild()
)... I guess that isn't working correctly for external URLs?An advantage of continuing to try to do it client-side is that you avoid the problem of the hook implementations being short-circuited.
A disadvantage is that it has to wait for the entire page to load inside the overlay before it knows it's not supposed to be in there, then load the same page again outside the overlay. This can sometimes lead to unexpected behavior when done inside Drupal (#936686: "Installation failed" errors when installing modules from Update Manager w/ Overlay) and could probably lead to weird behavior outside of Drupal also.
Comment #3
michaelfavia CreditAttribution: michaelfavia commentedSubscribe.
Comment #4
YesCT CreditAttribution: YesCT commented#1: overlay_goto.patch queued for re-testing.
Comment #6
univate CreditAttribution: univate commentedConfirmed the issues still exists.
Example code (attached as a module) that shows the error:
Comment #7
andymartha CreditAttribution: andymartha commentedIn a fresh installation of Drupal 8.x-dev, I can confirm that external links in a menu (for example), with the overlay module on, get denied because of cross-domain same-site-origin policy etc... See screenshot. Thanks univate!
After applying overlay_goto-1152314-6.patch from #6, the external links open successfully in a full browser window (you know what a website in a browser looks like).
Comment #8
tim.plunkettI'm not 100% sure that we can reliably test the correct behavior here, but we should be able to assert that the current and incorrect behavior goes away.
Comment #9
nod_Overlay is dead to D8 #2088121: Remove Overlay.