ether / etherpad-lite

Etherpad: A modern really-real-time collaborative document editor.
http://docs.etherpad.org/
Apache License 2.0
16.46k stars 2.84k forks source link

Embedding Etherpad into Website via Iframe produces errors out #6618

Closed JannesAlthoff closed 5 days ago

JannesAlthoff commented 2 weeks ago

I'm currently using version v2.2.2, embedding Etherpad into a website doesn't work anymore. Opening the Pad directly works without problems


An error occurred

Please press and hold Ctrl and press F5 to reload this page

If the problem persists, please send this error message to your webmaster:
TypeError: parent.parent.$ is not a function
at https://xxx/etherpad/padbootstrap-jqYVYaHuN2w.min.js at line 50
ErrorId: 0T0ZSWrhmrjW2jP1dMoF
Unhandled Promise rejection
URL: https://xxx/etherpad/p/oNGvNTCCXD335FwIuNNJ7ZONM3M1a1?showControls=false&showChat=false&showLineNumbers=true&useMonospaceFont=false&userName=unnamed&noColors=false&userColor=false&hideQRCode=false&alwaysShowChat=false&rtl=false
UserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0
bishalCord commented 2 weeks ago

Same problem is happing :

I have recently upgraded my etherpad to v2.2.2. I am also able to access the pads directly but not able to accees it from my another website with iframe.

Error I am getting:

SecurityError: Failed to read a named property 'document' from 'Window': Blocked a frame with origin "https://pad./jf" from accessing a cross-origin frame. at unknown at line -1 ErrorId: DLrYc7gSOVk2Et657lY5 Unhandled Promise rejection URL: https://sss/p/xxx UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Please suggest me a way to solve these problem.

SamTV12345 commented 1 week ago

Please try to stay at v2.1.1 until it is fixed. The changes to bundling involved changing the location of the scripts. This seems to have broken the iframe. I'll come up with a solution.

dcht00 commented 6 days ago

Also see #6587

SamTV12345 commented 6 days ago

@JannesAlthoff @bishalCord Try the latest develop image of Etherpad. I removed all cross origin iframe requests.

JannesAlthoff commented 5 days ago

Thanks it works!

SamTV12345 commented 5 days ago

Thanks for the confirmation :)

bishalCord commented 4 days ago

@JannesAlthoff @bishalCord Try the latest develop image of Etherpad. I removed all cross origin iframe requests.

Thanks @SamTV12345 . It is working fine now.