Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression with Chrome 73 in Typo3 7.6.32 #26

Closed
foppelfb opened this Issue Feb 27, 2019 · 40 comments

Comments

Projects
None yet
@foppelfb
Copy link

foppelfb commented Feb 27, 2019

Effect of the Problem:
When viewed in a Chrome 73 (MacOS Version 73.0.3683.46 (Official Build) beta (64-bit)) the RTE displays an empty raw HTML Document.
The Javascript Console does not throw an error, last message pertaining the RTE is:
[HTMLArea.Editor::onFrameworkReady]: Editor ready.

Chrome 72 works as expected, so do recent Firefox and Safari

@ohader

This comment has been minimized.

Copy link
Contributor

ohader commented Mar 13, 2019

Confirmed in TYPO3 v8 as well...

@pschriner

This comment has been minimized.

Copy link

pschriner commented Mar 13, 2019

Screenshot_2019-03-13_11-35-55

For some reason chrome never loads the resources

When debugging (chrome://net-internals) I get

{"params":{"description":"","error_code":"8 (CANCEL)","stream_id":863},"phase":0,"source":{"id":13650,"type":9},"time":"112707070","type":191},

Which is not really helpful

@kkugelmann

This comment has been minimized.

Copy link

kkugelmann commented Mar 13, 2019

+1 here

@Geddo

This comment has been minimized.

Copy link

Geddo commented Mar 13, 2019

+1
Breaks my RTE on 6.2 LTS and 7.6 LTS
no problem with 8.7.24 so far

@amtmich

This comment has been minimized.

Copy link

amtmich commented Mar 14, 2019

+1 - same in 6.2 LTS

@andreasberniczki

This comment has been minimized.

Copy link

andreasberniczki commented Mar 14, 2019

Same problem with 7.6 LTS

@bmack

This comment has been minimized.

Copy link
Member

bmack commented Mar 14, 2019

Thanks for the reports. I will see how time fits to fix this for RTEHtmlArea + TYPO3 v8. However, this repository only supports RTEHtmlArea for TYPO3 v8 LTS, so any issues regarding TYPO3 Core 6.2 and 7.6 won't and can't be addressed here, as the code base of the extension has changed since TYPO3 6.2/v7 (e.g. no ExtJS anymore).

If you have an active ELTS for TYPO3 v6.2/v7, there is a fix underway for the included RTEHtmlArea as well AFAIK. If you don't have ELTS, now is a good time to evaluate this https://typo3.com/products/extended-support.

@guppy42

This comment has been minimized.

Copy link

guppy42 commented Mar 14, 2019

To fix it for chrome 73:

Open the editor file:
for 6.2 it's /typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js
for LTS 7 it's /typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/HTMLArea/Editor/Editor.js

locate the line that says;

src: UserAgent.isGecko ? 'javascript:void(0);' : (UserAgent.isWebKit ? 'javascript: \'' + Util.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

and change it to

src: UserAgent.isGecko ? 'javascript:void(0);' : (UserAgent.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

That's it - 6.2 seems to automatically notice the file has changed and creates a new merged file containing the change.

In 7.2 the file gets served with ?bust=..... meaning if your server asks clients to cache JS for x days it will be a while before the change reaches them.

Any idea how I can forcibly change this bust value?

@thegass

This comment has been minimized.

Copy link

thegass commented Mar 14, 2019

8.7 picks up the change instant.
fix seems to work for 8.7

@andreasfernandez

This comment has been minimized.

Copy link
Contributor

andreasfernandez commented Mar 14, 2019

Many thanks to @guppy42, I was fiddling at the same line and wondered what happens here. I will create a PR for this.

andreasfernandez added a commit to andreasfernandez/rtehtmlarea that referenced this issue Mar 14, 2019

[BUGFIX] Use non-JavaScript based iframe src
Since the release of Chrome 73, iframe documents can't be loaded via
javascript protocol anymore. This commit changes the iframe src to
be an empty page for WebKit browsers.

Resolves: FriendsOfTYPO3#26
@guppy42

This comment has been minimized.

Copy link

guppy42 commented Mar 14, 2019

Seems the only way to change the ?bust= is to either go into development mode or alter the typo3 version
TS_7/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php:88: define('TYPO3_version', '7.6.32');

should be safe, but do so at your own peril ;)

@kevinlieser

This comment has been minimized.

Copy link

kevinlieser commented Mar 14, 2019

Worked – thanks a lot!

@hkarvasonis

This comment has been minimized.

Copy link

hkarvasonis commented Mar 14, 2019

Thanks a lot for the fix! That worked as expected.

@bmack bmack closed this in #28 Mar 15, 2019

andreasfernandez added a commit to andreasfernandez/rtehtmlarea that referenced this issue Mar 15, 2019

[BUGFIX] Do not use about:blank as src in other Webkit browsers than …
…Chrome

Only Chrome needs `about:blank` as iframe src as introduced in FriendsOfTYPO3#28. Safari
can't handle this and treats `about:blank` as a cross origin.

Resolves: FriendsOfTYPO3#30
Related: FriendsOfTYPO3#26

andreasfernandez added a commit to andreasfernandez/rtehtmlarea that referenced this issue Mar 15, 2019

[BUGFIX] Do not use about:blank as src in other Webkit browsers than …
…Chrome

Only Chrome needs `about:blank` as iframe src as introduced in FriendsOfTYPO3#28. Safari
can't handle this and treats `about:blank` as a cross origin.

Resolves: FriendsOfTYPO3#30
Related: FriendsOfTYPO3#26
@amtmich

This comment has been minimized.

Copy link

amtmich commented Mar 18, 2019

Yes - that file is little different from the one in 7.x. You need to patch that line https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_6-2/typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js#L2187 and change it to
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

@stigfaerch

This comment has been minimized.

Copy link

stigfaerch commented Mar 18, 2019

Yes - that file is little different from the one in 7.x. You need to patch that line https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_6-2/typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js#L2187 and change it to
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

Thanks! I also found it and hurried to deleted my post, but you were to quick and managed to answer me before it was gone :-)

I changed to this instead (according to the fix in issue #31 )
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? (Ext.isChrome ? 'about:blank;' : 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' ): HTMLArea.editorUrl + 'popups/blank.html')

@erthi16

This comment has been minimized.

Copy link

erthi16 commented Mar 18, 2019

Hello to all!

I've tested successfully with my TYPO3 ver. 7 but with my version 6.2.40, nothing works... Is it possible to remove browser detection or at least the Chrome detection? Is it related to the browser signature?
Thank you all for your help!

Eric Thibault

@slimco

This comment has been minimized.

Copy link

slimco commented Mar 19, 2019

Thanks! For my Typo3 6.2 works rewrite code to
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

original code was:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')

@susannemoog

This comment has been minimized.

Copy link
Contributor

susannemoog commented Mar 19, 2019

@Boa2

This comment has been minimized.

Copy link

Boa2 commented Mar 20, 2019

I changed to this instead (according to the fix in issue #31 )
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? (Ext.isChrome ? 'about:blank;' : 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' ): HTMLArea.editorUrl + 'popups/blank.html')

How would this line look for Typo3 7? Like so?
src: UserAgent.isGecko ? 'javascript:void(0);' : (UserAgent.isWebKit ? (UserAgent.isChrome ? 'about:blank;' : 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' ): HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

or like so (found here: https://typo3.toaster-schwerin.de/typo3_german/2019_03/msg00035.html):
src: UserAgent.isGecko ? 'javascript:void(0);' : (UserAgent.isWebKit ? (UserAgent.isChrome ? 'about:blank;' : 'javascript: \'' + Util.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' ): HTMLArea.editorUrl + 'Resources/Public/Html/blank.html')

@guppy42

This comment has been minimized.

Copy link

guppy42 commented Mar 20, 2019

@Boa2

you could just look at the diff for #31 : 02cc2be

@Boa2

This comment has been minimized.

Copy link

Boa2 commented Mar 20, 2019

@Boa2

you could just look at the diff for #31 : 02cc2be

Thanks. This works.

@baden32

This comment has been minimized.

Copy link

baden32 commented Mar 26, 2019

Is there a chance that the problem will be fixed with Chrome version 74 or do we definitely need to patch rtehtmlarea js files?

@runningnet

This comment has been minimized.

Copy link

runningnet commented Mar 26, 2019

This work for me in 4.7 (i know it is old)
File: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js Line about: 2214

I change this:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')

with that:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

@erthi16

This comment has been minimized.

Copy link

erthi16 commented Mar 26, 2019

The 6.2.41 version worked on our second server... we are redoing the first one and retesting.

@crealistiques

This comment has been minimized.

Copy link

crealistiques commented Mar 27, 2019

I can confirm. For me an update to latest ELTS version 6.2.41 worked as a fix!

@erthi16

This comment has been minimized.

Copy link

erthi16 commented Mar 27, 2019

Message from doctotto (and tested on at least one site in our ecosystem):

This work for me in 4.5.40 (i know it is old)²
File: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js Line : 2224
from:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: '' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + ''' : HTMLArea.editorUrl + 'popups/blank.html')
to:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? (Ext.isChrome ? 'about:blank;' : 'javascript: '' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + ''') : HTMLArea.editorUrl + 'popups/blank.html')

@metaa

This comment has been minimized.

Copy link

metaa commented Mar 28, 2019

Would be nice if someone hit up the Chromium issue tracker and created a new issue - or contributed to one if one already exists that might be related to this problem.

This way we're not just spinning up workarounds but they can actually investigate and resolve that issue.

@Turbotailz

This comment has been minimized.

Copy link

Turbotailz commented Mar 28, 2019

This is also a problem in v4 - don't ask, client won't pay to upgrade

@andreasfernandez

This comment has been minimized.

Copy link
Contributor

andreasfernandez commented Mar 29, 2019

Would be nice if someone hit up the Chromium issue tracker and created a new issue - or contributed to one if one already exists that might be related to this problem.

This way we're not just spinning up workarounds but they can actually investigate and resolve that issue.

I don't think this is a bug in Blink rendering engine, but a security change that breaks our legacy code base, which is absolutely fine.
I don't consider the fix(es) a workaround, but necessary changes to let HtmlArea work with the latest versions of the rendering engine.

@wolfgang007

This comment has been minimized.

Copy link

wolfgang007 commented Apr 1, 2019

Is there a fix for 8.7 already?

@mmasmoudi

This comment has been minimized.

Copy link

mmasmoudi commented Apr 2, 2019

I'm looking for a fix for Typo3 8.7 too.

@andreasfernandez

This comment has been minimized.

Copy link
Contributor

andreasfernandez commented Apr 2, 2019

You should be able to update the extension either from TER or packagist.

@sevenflip

This comment has been minimized.

Copy link

sevenflip commented Apr 2, 2019

Link to the chromium bugreport:
https://bugs.chromium.org/p/chromium/issues/detail?id=946984

Add ⭐️ to push it (sign in & click in the top left corner)

@mmasmoudi

This comment has been minimized.

Copy link

mmasmoudi commented Apr 2, 2019

@andreasfernandez Yes i did that already, i upgraded to version 8.7.2 but this didn't resolve the problem.

@andreasfernandez

This comment has been minimized.

Copy link
Contributor

andreasfernandez commented Apr 2, 2019

@mmasmoudi I fail to reproduce the issue after upgrading to 8.7.2. Did you clear your browser caches after installing the update?

@mmasmoudi

This comment has been minimized.

Copy link

mmasmoudi commented Apr 2, 2019

@andreasfernandez Sorry, forget clear cache from browser after the TER update, problem is resolved, Thank you !

@Kai-Petersen

This comment has been minimized.

Copy link

Kai-Petersen commented Apr 2, 2019

After installing the Patch i can use the RTE, but it's not possible to save an empty RTE. Each time i save the content element, a linebreak is added too the textarea an in the frontend i get an empty p tag for every linebreak. In WYSIWYG-MODE, the linebreaks not shown, only in TEXT-MODUS they are visible.

@tommysack

This comment has been minimized.

Copy link

tommysack commented Apr 4, 2019

This work for me in 4.7 (i know it is old)
File: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js Line about: 2214

I change this:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')

with that:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

@runningnet Hy, In my version (4.5 very very old, i know) I have replaced the code in htmlarea.js
but it returns every time the same old code in typo3temp/compressor/htmlarea_cumulative__compressed-.js
Have you delete some files after the fix? Also if I delete the compressed file it create the same htmlarea_cumulative__compressed-.js with old code..

@doctotto

This comment has been minimized.

Copy link

doctotto commented Apr 4, 2019

This work for me in 4.7 (i know it is old)
File: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js Line about: 2214
I change this:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')
with that:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

@runningnet Hy, In my version (4.5 very very old, i know) I have replaced the code in htmlarea.js
but it returns every time the same old code in typo3temp/compressor/htmlarea_cumulative__compressed-.js Have you delete some files after the fix? Also if I delete the compressed file it create the same htmlarea_cumulative__compressed-.js with old code..

Yes you should clear the RTE Cache (backend top right lighting bolt icons)

@tommysack

This comment has been minimized.

Copy link

tommysack commented Apr 9, 2019

This work for me in 4.7 (i know it is old)
File: typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js Line about: 2214
I change this:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')
with that:
src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'about:blank;' : HTMLArea.editorUrl + 'popups/blank.html')

@runningnet Hy, In my version (4.5 very very old, i know) I have replaced the code in htmlarea.js
but it returns every time the same old code in typo3temp/compressor/htmlarea_cumulative__compressed-.js Have you delete some files after the fix? Also if I delete the compressed file it create the same htmlarea_cumulative__compressed-.js with old code..

Yes you should clear the RTE Cache (backend top right lighting bolt icons)

Ok thanks, it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.