exponentcms / exponent-cms

Content Management, Simple.
exponentcms.org
GNU General Public License v2.0
60 stars 24 forks source link

CKEditor not working in IE or Chrome #1325

Closed exponentcms closed 4 years ago

exponentcms commented 4 years ago

CKeditor is fine in Firefox (latest), Safari (5.1.7) and Opera (28). It is not working in IE 11 or Chrome (41). Screenshot is IE. A small window briefly opens then disappears as expected, but the editor window does not then open.

Also, changing config.js, for example to change editor colours, does not work, the file does not appear to load (Firefox, Safari, Opera). It's also not clear in the documentation how to use the site's CSS within the editor.

Peter.

exponentcms commented 4 years ago

Additionally, just tested with Firefox so far, when I click to add a link, then say Browse Server, I get the usual Insert / Modify Link screen. I click on Switch to File Manager and get the attached 'Listings for expFile message instead of File manager.

exponentcms commented 4 years ago

Did you try turning off minification for Js? Go to configure website -> Minify -> Remove the check mark beside "Minify and Combine linked js scripts?"

exponentcms commented 4 years ago

I hadn't, now I have, makes no difference. Peter.

exponentcms commented 4 years ago

Ref for editor stylesheets - http://docs.exponentcms.org/docs/2.3.3/integrating-styles-in-the-editor

FYI, the 'box' you see is likely the textarea control before it's hijacked by ckeditor. I use Firefox & IE11 & Chrome all the time and have had no issues.

Quick fix/test might be to switch to using the TinyMCE editor (use site configuration to change)

exponentcms commented 4 years ago

Thanks for the link, I missed that one.

The textarea has an inline visibity:hidden when I look at the console. If I change this the textarea appears. Without analysing every line, the inline editor code appears to be there and does not look any different to the same block in Firefox's source. The level of CKEditor you are shipping appears to be at a level that should be compatible with IE11 (I see earlier versions showed similar problems to what I am seeing). Is it possible that something from the old editor has been carried across during migration from 0.9x ?

I tried TinyMCE, it works but is not a practical alternative as my editors are familiar with the CKE interface.

The Switch to File Manager problem in the additional append is the same as happened during the early stages of development of the last (Sandtoft) site while it was on my Fasthosts shared server account (#1180). This was only resolved by moving to Sandtoft's own server. This is not an option this time around, I know this is a Fasthosts issue but I need to find how to fix it as they don't acknowledge this a stheir problem. I don't have this problem on the currently live 0.9x site.

exponentcms commented 4 years ago

Any 'issues' carried in from 0.9x (doubt there could be any) would be isolated to the text item content and wouldn't appear on a new item.

You might try quickly switching back to one of the installed/shipped themes (simpletheme) to see if it might be related to your custom theme?

The WYSIWYG editors work on top of existing textareas by making the original/real textarea hidden. We were using FCKEditor (pre-CKEditor name) in 0.9x.

File Manager issue...are your referring to #1180 or #1163? Have you tried both file managers (elFinder and Traditional)?

exponentcms commented 4 years ago

I thought that would be the case. Changing theme did not help. I've also trawled through IE's settings and not found anything untoward.

File Manager issue is 1180. Same problem on both.

exponentcms commented 4 years ago

I'm not a server configuration expert! I was reading about Fasthosts not working for other cms applications because they don't allow certain .htaccess commands...for Drupal, https://www.drupal.org/node/181027

You might try this pared down .htaccess file in your root folder (comments removed)

Options -Indexes
DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
exponentcms commented 4 years ago

That makes two of us!! I'm afraid that didn't help either. It looks like Fasthosts can't resolve:

http://devel.britishtrolley.org.uk/file/picker?ajax_action=1&update=ck&CKEditor=body&CKEditorFuncNum=1&langCode=en

I don't know what's supposed to happen, with the 'file' folder containing the picker file not being directly under the domain name.

The direct call to File manage http://devel.britishtrolley.org.uk/file/picker/ajax_action/1/update/ck/filter/image?CKEditor=body&CKEditorFuncNum=1&langCode=en#elf_l1_Y29udGVudC9pbWFnZXMvaG9tZQ works fine.

exponentcms commented 4 years ago

One of my administrators has reported the same editing problem in his Firefox, latest version = same as me, mine works his doesn't. Also now confirmed it does not work on iPad with Safari nor on iPhone.

exponentcms commented 4 years ago

IE11 Console error attached.

exponentcms commented 4 years ago

This issue (ckeditor not appearing in ie11 under Dutch language) was caused by a missing ckeditor language file (ckeditor is not graceful about this). It was fixed in a recent push.

exponentcms commented 4 years ago

Can you please explain the connection between my English language site and Dutch language files? Thanks.

exponentcms commented 4 years ago

Basically, most of the system and the 'widgets' load a language file (if available) based on either 1) the language of the site set within site configuration, or the language of the browser set on the pc. Apparently in the case of CKeditor, it uses the browser language to load the language file. We had stopped including it's extra language files for languages we don't ship (Dutch in your case). This was corrected to include all CKEditor languages are now shipped.

exponentcms commented 4 years ago

Unfortunately this is not the problem. First of all the browser language is English - see screen shot, and secondly I have downloaded all language files from ckeditor and put them on the server and it still does not work.

exponentcms commented 4 years ago

Today I did a bulk copy of the ckeditor folder from a working site to the problem site. The problem on my machine with IE and Chrome has disappeared. I will now check that the site editors are able to edit too before closing this off.

exponentcms commented 4 years ago

Lighthouse URL: https://exponentcms.lighthouseapp.com/projects/61783/tickets/1281