Copy link to clipboard
Copied
I have a WebHelp system that I originally generated in RH9. Pages from that generated output seem to do fine when I use translate.google.com to translate them, regardless of browser. However, I've subsequently upgraded to RH11, and now the new generated output causes problems in some browsers. Specifically, the error message in Firefox (v. 33.0.3) is "Error: Permission denied to access property 'whname'," pointing to line 10 in whproxy.js. Chrome (38.0.2125.111m) gives the following error message, pointing to the same line in the same file: "Uncaught SecurityError: Blocked a frame with origin "http://translate.googleusercontent.com" from accessing a frame with origin "http://translate.google.com". Protocols, domains, and ports must match."
For what it's worth, here's the function it's talking about, from RH11's generated whproxy.js:
function getStubPage_inter(wCurrent) {
if (null == wCurrent.parent || wCurrent.parent == wCurrent)
return null;
if (typeof (wCurrent.parent.whname) == "string" && "wh_stub" == wCurrent.parent.whname)
return wCurrent.parent;
else {
if (wCurrent.parent.frames.length != 0 && wCurrent.parent != wCurrent)
return getStubPage_inter(wCurrent.parent);
else
return null;
}
}
I'm so unfamiliar with JavaScript that I can't make heads or tails of this, and I haven't had any successful suggestions from within my company. One developer suggested that I should take the whproxy.js that was generated by RH9 and stick that into my generated output, since doing so solves the problem. I'm a bit hesitant to do that, as I figure that there might actually be reasons for the (MANY) differences between the two versions and I'm uncertain what I'll break or lose by using an old version of the file. I'm hoping that somebody here might be able to enlighten me as to possible consequences of such an action, or possible workarounds, or anything else of interest. (And please, no commentary on the relative value of using Google Translate. It wasn't my decision, I just build the help! 🙂 )
Thanks,
Melinda
Copy link to clipboard
Copied
So everything displays and functions fine in the help except when run through Google Translate? I’d be checking to see if Google’s got some problems, not RH.
Copy link to clipboard
Copied
The message here is a security error. The browser blocks an XSS vulnerability that comes up (I suspect) because of the frame handling by RoboHelp.
In your ouptut, simply rename the existing file and paste the RH9 version in the output. At worst, the output won't work (correctly) and you have to restore the original whproxy.js. RH9 and RH11 are VERY different in their WebHelp code. It will give you lots of problems if you try to view the help locally, but with a bit of luck, it might just work on a web server.
Kind regards,
Willam
Copy link to clipboard
Copied
@MSCaroline – have you tried experimenting with HTML5 output instead of WebHelp? Does it trigger the same security warnings?