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

TinyMCE4 does not work in Chrome 85.0.4183.102 #7615

Closed
dddns opened this issue Sep 20, 2020 · 25 comments
Closed

TinyMCE4 does not work in Chrome 85.0.4183.102 #7615

dddns opened this issue Sep 20, 2020 · 25 comments

Comments

@dddns
Copy link

dddns commented Sep 20, 2020

Howdy,
I upgraded from 1.4.1 to 1.4.8, and where i have identities with signatures that contain images, they are not present when i create a new message.
Attach there's the identity raw source with the image in base64,
I tried old signatures that already existed, and creating a new one, same behavior,

If there's anything that is needed from me let me know.
identity.txt

@dddns dddns changed the title Identify signature with images Identities signature with images Sep 20, 2020
@alecpl
Copy link
Member

alecpl commented Sep 20, 2020

But they are fine in the identity editor? Are you sure you're using HTML mode for mail compose?

@dddns
Copy link
Author

dddns commented Sep 20, 2020

Hi Alec,

Yes for both, and confirmed in the identities table, it has html_signature=1

@dddns
Copy link
Author

dddns commented Sep 20, 2020

Wait!
HTML for new mail compose, well, it's composing as text by default, that's the issue!
I got it Alec, sorry for the trouble!

defaults.inc.php now has htmleditor=0 and before it used to have =1

Thank you for helping me, i'm going to insert this config in my config.inc.php for now having trouble in the future,

@alecpl alecpl closed this as completed Sep 20, 2020
@dddns
Copy link
Author

dddns commented Sep 20, 2020

Hi Alec, you may need to reopen this.

There's an extra issue in last chrome with the html signature, you can use the one that is in the 1st post.
With this scenario, when creation a new email message, the body text get's disabled, and it's impossible to write.
See if you can reproduce and let me know:

  • last chrome version
  • insert an htmlsignature to the identify
  • set in defaults or config.inc.php: $config['htmleditor'] = 1;

and the textmessage box is inactive

  • if i set for example $config['htmleditor'] = 0 for text only, it's ok. on latest FF there's no issue,

Let me know,

PS: Sent you an test account via email in the test at alec pl, only happens in chrome. latest FF or EDGE (the new one) works ok.
And found a simple way to test, on new messages, changing the bellow combo from text to html or vice-versa, you can reproduce it,

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

@dddns I was not able to reproduce the issue using Chromium 85.0.4183.83.

@dddns
Copy link
Author

dddns commented Sep 21, 2020

Alec,
I just tested and can't write in the email body, i can see you changed the theme for elastic, but the body box is inactive either in elastic, classic or larry,
If i change the default in prefs of compose email in html = never, works, since it's in text
What could i do to see what's wrong here? only happens in chrome latest.

Here's a video i've made with the test account i sent you, are you able to check whats wrong with this?
Just a clue, this can be something with the tinymce with latest chrome, just an ideia,

2020-09-21-11-46-31.zip

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

Check browser console for errors. What happens in Identities, as well as in compose suggests a javascript error. What exact version is chrome latest you're using?

@dddns
Copy link
Author

dddns commented Sep 21, 2020

Alec,

Check these images if helps,
code that has the warning or error:

code.txt
img1
img2

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

So, now we know that TinyMCE 4.8.2 throws an error in lastest chrome. What chrome version is this?

@dddns
Copy link
Author

dddns commented Sep 21, 2020

85.0.4183.102
x64

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

It works in Chorme 85.0.4183.83. I think we have to test if TinyMCE 4.8.5 or 4.9.11 would work without issues. Update to 5.x might be too big of an exercise for Roundcube 1.4.

@alecpl alecpl reopened this Sep 21, 2020
@alecpl alecpl changed the title Identities signature with images TinyMCE4 does not work in Chrome 85.0.4183.102 Sep 21, 2020
@alecpl alecpl added this to the 1.4.9 milestone Sep 21, 2020
@dddns
Copy link
Author

dddns commented Sep 21, 2020

Great Alec,
How can i update tinymce to confirm that?
If you could give me the instructions to do it would be great, and we would confirm it.
I've downloaded both 4.8.5 and 4.9.11 versions of tinyMCE,

@dddns
Copy link
Author

dddns commented Sep 21, 2020

Alec,

I replaces files in program/js/tinymce, with version 4.8.5, 4.9.5 and 4.9.11, and same behavior,
Maybe i'm missing something or something else,

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

Try this:

  1. Apply this patch:
diff --git a/jsdeps.json b/jsdeps.json
index cb9efae89..52254e7ed 100644
--- a/jsdeps.json
+++ b/jsdeps.json
@@ -36,10 +36,10 @@
     },
     {
       "lib": "tinymce",
-      "version": "4.8.2",
-      "url": "https://download.tiny.cloud/tinymce/community/tinymce_$v.zip",
+      "version": "4.9.11",
+      "url": "https://download.tiny.cloud/tinymce/community/tinymce_$v_dev.zip",
       "dest": "program/js",
-      "sha1": "d7fced05acdeeb78299585ea9909b0de2b3d759d",
+      "sha1": "524a3daf79703b0c8de4ffa303b9ccb05731a397",
       "license": "LGPL",
       "copyright": "Copyright (c) 1999-2015 Ephox Corp. All rights reserved",
       "rm": "program/js/tinymce",
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 1ab3dcc4f..fe22fe650 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -2107,7 +2107,7 @@ class rcmail extends rcube
             }
         }
 
-        $this->output->include_script('tinymce/tinymce.min.js');
+        $this->output->include_script('tinymce/tinymce.js');
         $this->output->include_script('editor.js');
     }
 
diff --git a/program/js/editor.js b/program/js/editor.js
index 552de9a79..43b726b5f 100644
--- a/program/js/editor.js
+++ b/program/js/editor.js
@@ -39,7 +39,7 @@ function rcube_text_editor(config, id)
     abs_url = location.href.replace(/[?#].*$/, '').replace(/\/$/, ''),
     conf = {
       selector: '#' + ($('#' + id).is('.mce_editor') ? id : 'fake-editor-id'),
-      cache_suffix: 's=4080200',
+      cache_suffix: 's=40091100',
       theme: 'modern',
       language: config.lang,
       content_css: rcmail.assets_path(config.content_css),
  1. Run php bin/install-jsdeps.sh tinymce
  2. Test now, check browser console. If there's still an error it should be more helpful than before.

@dddns
Copy link
Author

dddns commented Sep 21, 2020

Alec,
How could i solve this? sorry for my dumbness!
Is there a way that i can force the download and not check for the package SHA1 ?

root@webservices:/home/hosting/dhosting.pt/webmail# php bin/install-jsdeps.sh tinymce
Installing tinymce...
ERROR: Incorrect sha1 sum of /home/hosting/dhosting.pt/webmail/temp/js_cache/tinymce-4.9.11.zip. Expected: 524a3daf79703b0c8de4ffa303b9ccb05731a397, got: da39a3ee5e6b4b0d3255bfef95601890afd80709

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

Looks like you didn't apply the patch properly. it should be fetching tinymce-4.9.11_dev.zip.

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

Or rather you have to remove temp/js_cache/tinymce-4.9.11.zip file.

@dddns
Copy link
Author

dddns commented Sep 21, 2020

Alec,

There's another way i can do it? Can i just overwite the files in program/js/tinymce ?

I have the version forced in jsdeps.json:
"lib": "tinymce",
"version": "4.9.11",
"url": "http://download.ephox.com/tinymce/community/tinymce_4.9.11_dev.zip",
"dest": "program/js",
"sha1": "524a3daf79703b0c8de4ffa303b9ccb05731a397",
"license": "LGPL",

root@webservices:/home/hosting/dhosting.pt/webmail# php bin/install-jsdeps.sh tinymce
Installing tinymce...
ERROR: Incorrect sha1 sum of /home/hosting/dhosting.pt/webmail/temp/js_cache/tinymce-4.9.11.zip. Expected: 524a3daf79703b0c8de4ffa303b9ccb05731a397, got: da39a3ee5e6b4b0d3255bfef95601890afd80709
root@webservices:/home/hosting/dhosting.pt/webmail# cat bin/install-jsdeps.sh |grep -i tiny
root@webservices:/home/hosting/dhosting.pt/webmail# cat jsdeps.json |grep -i tiny
"lib": "tinymce",
"url": "http://download.ephox.com/tinymce/community/tinymce_4.9.11_dev.zip",
"rm": "program/js/tinymce",
"js/tinymce": "tinymce"
"tinymce/license.txt",
"tinymce/jquery.tinymce.min.js"
"tinymce/tinymce.min.js"
"lib": "tinymce-langs",
"url": "https://tinymce-services.azurewebsites.net/1/i18n/download?langs=ar,hy,az,eu,be,bs,bg_BG,ca,zh_CN,zh_TW,hr,cs,cs_CZ,da,nl,en_CA,en_GB,eo,et,fo,fi,fr_FR,fr_CH,gd,gl,ka_GE,de,de_AT,el,he_IL,hi_IN,hu_HU,is_IS,id,ga,it,ja,kab,km_KH,ko_KR,ku,ku_IQ,lv,lt,lb,mk_MK,ml_IN,nb_NO,oc,fa,fa_IR,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,es,es_MX,sv_SE,tg,ta,ta_IN,tt,th_TH,tr,tr_TR,ug,uk,uk_UA,vi,vi_VN,cy",
"dest": "program/js/tinymce"
root@webservices:/home/hosting/dhosting.pt/webmail#

@dddns
Copy link
Author

dddns commented Sep 21, 2020

Alec,

I replaced the files in the dir, and made the changes manually in the patch, here's the output, is there anything that helps?
whouldn't the info on the alt be s=40091100 ? i have it changed in the code.

error_with_mce4911
error_with_mce4911.txt
error_with_mce4911_s_var

@alecpl
Copy link
Member

alecpl commented Sep 21, 2020

No, it isn't. It's still using minified files. Remove temp/js_cache/tinymce-4.9.11.zip file, apply the whole patch properly and run install-jsdeps.

@dddns
Copy link
Author

dddns commented Sep 22, 2020

Alec,
I thought i had replied yesterday.
I can confirm that is working, i replaced the tinymce files with the 4.9.11 version.
It was not working due to browser cache, I just did a SHIFT+F5, and started working/the error was gone.

Could you include the 4.9.11 version in next roundcube version 1.4.9?

@alecpl
Copy link
Member

alecpl commented Sep 22, 2020

Ok, that's a plan. Looks like we might need the release soon.

@dddns
Copy link
Author

dddns commented Sep 22, 2020

Thank you Alec for all the help!
I'll stay tunned to check when the release goes out,

@alecpl
Copy link
Member

alecpl commented Sep 22, 2020

Fixed.

@alecpl alecpl closed this as completed Sep 22, 2020
@dddns
Copy link
Author

dddns commented Sep 22, 2020

google just released a new version, 85.0.4183.121 aswell.
(you have a typo into the fix log, 102 instead of 120).
Thanks again for all Alec,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants