Support » Fixing WordPress » iframe problem with upload.js

  • Hello everyone,
    I have a problem and I tried tenth of hack, but with no success…

    My WordPress is in a iframe (it must be so in my case) and everything works fine except when I click ‘Send to editor’ button -> it tells me “win.edInsertContent is not a function”.

    If I open it out of the iframe, I don’t have the problem… but unfortunately I need to open it in an iframe…

    I tried to hack it by changing win.edInsertContent(win.edCanvas, h);
    but I got another error:
    uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://.../wp-admin/post-new.php :: edInsertContent :: line 242" data: no]

    Does anyone have an idea?

    Thank you in advance,

    PS: I use FireFox

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,
    I have had a similar problem embedding WP in an iframe. I tried what you did and got the same result, my solution is:-

    In the sendToEditor function, 6 or 7 lines above the win.edInsertContent(win.edCanvas, h); line, is win = top;, changing this to win = parent. Now it works from both within iframes and on it’s own.

    Hope this helps someone, somewhere, sometime!!!

    Maybe, I’ll have to try it now. I had some success by going to Writing > Settings > formatting then uncheck “WordPress should correct invalidly nested XTML automatically” – it worked for a while but the problem is back again.

    I also use Firefox, but I get the problem with IE as well – and with Firefox on Ububtu/linux as well.

    I hope this problem that comes and goes would go once and for all: it is a big waste of time.

    Next: In Firefox, I disabled “Firebug” – Images loaded OK after that. So I=t seems that disabling all the features that “correct bad HTML” makes a difference, but I’m just groping in the dark.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘iframe problem with upload.js’ is closed to new replies.