Not sure if this is really a bug in overlay.module, or something wrong on my server, but I'm reporting it here on the outside chance it's the former.

In order to allow for automatic iframe height calculations for frame content generated by a subdomain on my site, I added the following to the element of my template file:

<script>
   document.domain="mysite.com";
</script>

When I click on an item in the administrator menu (where I would expect to get an overlay page), the screen goes gray, but no overlay content appears. Firebug reports the following errors:

Permission denied for <http://mydomain.com> to get property Location.pathname

var path = link.pathname;               overlay-parent.js?v=1.0 (line 830)


Permission denied for <http://mydomain.com> to call method Location.toString

if (iframeWindow.location == 'about:blank') {         overlay-parent.js?v=1.0 (line 267)

If I remove the document.domain assignment and flush the caches, then the overlay content appears normally.

I have tested this using Firefox, Chrome and Safari on MacOS X. Server is running Apache and php 5.3.13.

Comments

NumerousHats’s picture

That should have read

<script>
   document.domain="mydomain.com";
</script>

to make it consistent with the Firebug output. Sorry.

Putrefactica’s picture

Issue summary: View changes

I had the same issue and fixed it temporarily by setting the same domain in overlay-child.js, just before "if (!parent.Drupal || !parent.Drupal.overlay) {".

Hope this helps.

Version: 7.14 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.