Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 instances of mod_wrapper results in duplicate ID #17425

Closed
C-Lodder opened this issue Aug 6, 2017 · 3 comments
Closed

2 instances of mod_wrapper results in duplicate ID #17425

C-Lodder opened this issue Aug 6, 2017 · 3 comments

Comments

@C-Lodder
Copy link
Member

C-Lodder commented Aug 6, 2017

Steps to reproduce the issue

If you have 2 instances of mod_wrapper on 1 page, then there will be 2 iframes with the same ID ('blockrandom').

  • Create 2 wrapper modules
  • Assign them both to the same page
  • Inspect the element and they will have the same ID

When a PR is submitted, they'll also have to update: https://github.com/joomla/joomla-cms/blob/staging/media/com_wrapper/js/iframe-height.js#L4

System information

  • Joomla staging
@joomla-cms-bot joomla-cms-bot changed the title 2 instsnaces of mod_wrapper results in duplicate ID 2 instances of mod_wrapper results in duplicate ID Aug 6, 2017
@ghost
Copy link

ghost commented Aug 9, 2017

Issue confirmed.

@DrDreave
Copy link
Contributor

When examining the issue I noticed the media/com_wrapper/js/iframe-height.js isn't working properly in today's browsers. Enabling the auto height option in recent versions of Chrome and Firefox on MacOS has no effect.

e.g. Chrome throws:

Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://joomla-git-sample.local" from accessing a cross-origin frame.
    at HTMLIFrameElement.contentDocumentDesc.get [as contentDocument] (<anonymous>:66:14)
    at iFrameHeight (http://joomla-git-sample.local/media/com_wrapper/js/iframe-height.min.js?84614c47e342ac58508eacfcd3d2d1ec:1:99)
    at HTMLIFrameElement.onload (http://joomla-git-sample.local/wrapper-module:162:19)

I think alternative approaches of setting the height should be discussed before reworking the id assignment to the wrappers.

@brianteeman
Copy link
Contributor

Closed see #19136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants