[
https://issues.apache.org/jira/browse/SHINDIG-158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699681#action_12699681
]
Márton Salomváry commented on SHINDIG-158:
------------------------------------------
Implementing John Hjelmstad's about:blank hack seems to solve the problem
(tested in IE6, IE7, FF3, Safari3, Chrome, Opera9):
javascript/container/gadgets.js patch:
svn diff gadgets.js
Index: gadgets.js
===================================================================
--- gadgets.js (revision 14872)
+++ gadgets.js (working copy)
@@ -407,8 +407,11 @@
gadgets.Gadget.prototype.render = function(chrome) {
if (chrome) {
+ var gadget = this;
this.getContent(function(content) {
chrome.innerHTML = content;
+ window.frames[gadget.getIframeId()].location = gadget.getIframeUrl();
+ ;
});
}
};
@@ -517,7 +520,8 @@
gadgets.rpc.setAuthToken(iframeId, this.rpcToken);
continuation('<div class="' + this.cssClassGadgetContent + '"><iframe id="' +
iframeId + '" name="' + iframeId + '" class="' + this.cssClassGadget +
- '" src="' + this.getIframeUrl() +
+ //'" src="' + this.getIframeUrl() +
+ '" src="about:blank' +
'" frameborder="no" scrolling="no"' +
(this.height ? ' height="' + this.height + '"' : '') +
(this.width ? ' width="' + this.width + '"' : '') +
> Reloading when using postMessage causes RPC errors
> --------------------------------------------------
>
> Key: SHINDIG-158
> URL: https://issues.apache.org/jira/browse/SHINDIG-158
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Environment: Firefox 3.0, Safari 3.1
> Reporter: Paul Lindner
>
> 1) View sample container page
> 2) Before the gadget has rendered press reload (if using Firefox 3.0), For
> Safari just reload
> 3) rpc token errors will be observed, and dynamic-height etc will fail.
> I added some debugging, here's Safari's output
> setting authtoken to '1622832586
> http://mirth.inuus.com:8080/gadgets/files/samplecontainer/samplecontainer.html?
> BEWARE: permissive.js loaded
> http://mirth.inuus.com:8080/gadgets/ifr?url=http%3A%2F%2Fmirth.inuus.com%3A8080%2Fgadgets%2Ffiles%2Fsamplecontainer%2Fexamples%2FSocialHelloWorld.xml&synd=default&mid=0&nocache=1&country=ALL&lang=ALL&view=default&parent=http%3A%2F%2Fmirth.inuus.com%3A8080#rpctoken=983258013&st=john.doe:john.doe:samplecontainerapp:shindig
> Error: Invalid auth token: '983258013' does not match '1622832586'
> http://mirth.inuus.com:8080/gadgets/js/rpc.js?c=1&debug=1 (line 571)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.