Closed
Bug 668591
Opened 15 years ago
Closed 15 years ago
Persona previews loaded via iframe not working
Categories
(www.mozilla.org :: General, defect, P1)
www.mozilla.org
General
Tracking
(Not tracked)
VERIFIED
FIXED
3.0
People
(Reporter: sgarrity, Assigned: brandon)
References
()
Details
Attachments
(2 files)
On pages like:
http://www.mozilla.com/en-US/firefox/customize/#style
http://www.mozilla.com/pa-IN/firefox/3.6/firstrun/
The persona previews do not seem to be working anymore. They are loaded through an iframe.
If you load the contents of the iframe directly, they do work: http://www.getpersonas.com/en-US/external/mozilla/
| Reporter | ||
Comment 1•15 years ago
|
||
A few notes:
This doesn't seem to work in 3.6, 4.0.x, or 5. At first I assumed it might have been a security-related change in a point release, but even the original 3.6 doesn't seem to work (and it DID work at some point).
Also, I've ruled out other stuff on the parent page interacting with the iframe. The attached HTML file shows the simplest possible HTML file including the iframe, and it still doesn't work.
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → bsavage
Comment 2•15 years ago
|
||
Mkelly will have some insight into this. He recognized this yesterday and we thought it had something to do with the Snippet. He was able to get it working by cutting down the code to the basics.
Comment 3•15 years ago
|
||
Attached is a sample of the minimum code needed to preview a persona in an iframe. This example works when included in an iframe on FF6 and FF5.
Comment 4•15 years ago
|
||
I am able to replicate this issue on the getpersonas.com homepage by just including it within any iframe. This problem is not unique to the two examples in comment #1.
Comment 5•15 years ago
|
||
I looked into it more, and the issue appears to be in script.js:
http://svn.mozilla.org/projects/getpersonas.com/trunk/static/js/script.js
Specifically,
if (self != top) {
PERSONAS_ENABLED = false;
}
This sets PERSONAS_ENABLED to false when executed in an iframe, which causes the persona preview and install to fail. I removed this in a local test copy and the page worked again.
Comment 7•15 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=542020#c3 says we need to add code to mozilla.com
| Reporter | ||
Comment 8•15 years ago
|
||
(In reply to comment #7)
> https://bugzilla.mozilla.org/show_bug.cgi?id=542020#c3 says we need to add
> code to mozilla.com
I've added this code to the /firefox/customize page in trunk in r91928. We'll have to get to into production to test though (only works for www.mozilla.com). Can someone with super-powers get this into production?
Comment 9•15 years ago
|
||
(In reply to comment #8)
> (In reply to comment #7)
> > https://bugzilla.mozilla.org/show_bug.cgi?id=542020#c3 says we need to add
> > code to mozilla.com
>
> I've added this code to the /firefox/customize page in trunk in r91928.
> We'll have to get to into production to test though (only works for
> www.mozilla.com). Can someone with super-powers get this into production?
Maybe James Long can?
James?
Comment 10•15 years ago
|
||
Pushed to stage/production with r92047.
It's in prod but not working apparently. I suggest removing the try/catch and replace with a if(iframe.contentWindow.postMessage) to make debugging easier.
You can also play with your /etc/hosts to make your working environment respond to mozilla.com.
| Reporter | ||
Comment 11•15 years ago
|
||
(In reply to comment #10)
> It's in prod but not working apparently. I suggest removing the try/catch
> and replace with a if(iframe.contentWindow.postMessage) to make debugging
> easier.
Do you mind doing that? I can, but I'd still need you to push to production.
Comment 12•15 years ago
|
||
Comment 13•15 years ago
|
||
Confirmed that the persona previews are now working.
Thanks!
Updated•14 years ago
|
Component: www.mozilla.org/firefox → www.mozilla.org
Updated•14 years ago
|
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
You need to log in
before you can comment on or make changes to this bug.
Description
•