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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

grendzy’s picture

Status: Active » Needs review
Issue tags: +Needs backport to D7
FileSize
582 bytes

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

David_Rothstein’s picture

Hm, 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.

michaelfavia’s picture

Subscribe.

YesCT’s picture

Issue tags: -Needs backport to D7

#1: overlay_goto.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Needs backport to D7

The last submitted patch, overlay_goto.patch, failed testing.

univate’s picture

Status: Needs work » Needs review
FileSize
725 bytes
741 bytes

Confirmed the issues still exists.

Example code (attached as a module) that shows the error:

function overlaytest_menu() {
  $items['admin/overlaytest'] = array(
    'title' => 'Overlay test',
    'page callback' => 'overlaytest_page',
    'access arguments' => array('administer site configuration'),
  );
  return $items;
}

function overlaytest_page() {
  drupal_goto('http://drupal.org');
}
andymartha’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
61.59 KB

In 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).

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

I'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.

nod_’s picture

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

Overlay is dead to D8 #2088121: Remove Overlay.