exponentcms / exponent-cms

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

CKEditor text box not visible #1451

Closed exponentcms closed 4 years ago

exponentcms commented 4 years ago

www.britishtrolley.org.uk - since updating the site to 2.4.1 the editor has been displaying some strange symptoms, such as 'class' statements added in the source disappearing on saving the file. Today, for no obvious reason, the text box flashes on then off and the edit window does not open.

I went to the editor site and downloaded the latest version 4.6.2, followed the instructions and uploaded into the ckeditor folder. No change. I have swapped between the customised BTS profile and the default, still no change.

Please can you help?

Thanks. Peter.

exponentcms commented 4 years ago

I just went into site configuration to check the editor settings again. After looking at the BTS one I clicked Save. Now it won't load the configuration page - see screen shot.

exponentcms commented 4 years ago

Firefox Developer edition 54.0a2 (2017-03-20) (32-bit)

and

Firefox 51.0.1 (32-bit)

exponentcms commented 4 years ago

I'm not running a developer/pre-release version of firefox, but in most cases, this is the result of some other javascript breaking on the page. You might try opening up the browser console and looking for errors being reported as the page opens.

Depending on where/how you place the 'classes' in the text, CKEditor is intended to be somewhat helpful by cleaning up the html markup as it's being saved. E.g., some classes/tags are not allowed within CKEditor.

exponentcms commented 4 years ago

The problem is exactly the same in my normal Firefox 51.0.1, as mentioned above. It did run fine in that version until a short time ago.

Attached screen shot shows console.

exponentcms commented 4 years ago

Just looking at the page source, it looks like the configuration page is actually there, but is not displayed. See attached.

exponentcms commented 4 years ago

Done some more analysis and have found a div tag line 1317 in the attached file which says 'hide'. If I edit the html and remove 'hide' the page displays, albeit badly formatted.

Also found a couple of red tags lines 1289 / 1290 but haven't yet traced where that's coming from.

exponentcms commented 4 years ago

What you have discovered is how 'tabs' work, where all are 'hidden' then revealed when you click on the tab button.

Same for CKEditor, it hides the textarea box and then draws its own self.

You might try switching to the TinyMCE WYSIWYG editor as a test to see if that editor works.

Your issue might be double loading jquery...we generally load jquery for most other widgets (2.4.1 uses v2.2.4 or 1.12.4 if running an older browser), but it looks like you are also loading v1.7.2 with the theme template.

exponentcms commented 4 years ago

I am unable to switch editors as the configuration page will not load. That needs fixing first.

The site has been working fine until very recently, I will certainly look at removing extra jquery stuff but it's been like that for a long time.

exponentcms commented 4 years ago

Yes, but you seem to be updating from v2.3.3 which is 2 years old. It looks as though you have NOT yet upgraded the site...not sure if running the upgrade will eliminate some problems (it does more than just update the database)?

Login in as super-admin and browse to site.url.com/install/install.php

exponentcms commented 4 years ago

OK, I guess I thought I'd done the upgrade. Now I have, all ran OK but the problem is still there.

exponentcms commented 4 years ago

This has been caused by entering a value within the custom wysiwyg configuration which crashes the javascript on the page.

We'll need to add some error-checking within the code to help prevent this situation since once you break the page via the custom configuration, you can't correct it since the page won't display properly.

exponentcms commented 4 years ago

I've upgraded your login to super admin. Thanks for your help, sorry I screwed it up!

exponentcms commented 4 years ago

I have just identified another problem in the editor. When you add a link to an image the Advanced tab is missing from the pop-up.

Capture.jpg shows this. The second screenshot, Capture1.jpg is from a different site and shows what I should be seeing. This has also only happened recently and may be related.

BTW - I also tried to upgrade a user login to Admin and it didn't work, just as it didn;t work when I gave you the login. Your login I gave you last time is still valid.

Thanks.

exponentcms commented 4 years ago

Regarding the 'advanced' tab, I can't reproduce what you describe, but is it possible the 'advanced' tab disappears on embedded images with links? e.g., if you have a text word which you make into a link, the advanced tab will continue to appear regardless of where the link points to. However, when you add a link to an embedded image, the advanced tab will first appear, but since the image is a widget, the advanced tab will disappear in the future (after you save and re-edit the text) to prevent conflicts with the features the image widget provides?

Regarding the unable to change admin/super-admin setting, I can verify you have an issue with your site...however I'm not able to reproduce this locally. My test and production databases are mysql v5.5 and later...you're on v5.1 which may not be the issue, but mysql major version changes and be 'major' changes?

exponentcms commented 4 years ago

Not sure what you mean by 'the image is a widget'. Up until now, I have been able to add a new image, and on the advanced tab add the rel to slimbox. Even when editing an image, the advanced tab was always there - I recently had to update all images from Thickbox to Slimbox and it was there then.

I see exactly the same problem if I try to make a piece of text a link.

I logged in with your lighthouse2 user and I still see the same problem.

exponentcms commented 4 years ago

While I can confirm the 'admin' issue exists on your site...I cannot reproduce it locally on my production nor test servers running the same version.

Regarding the 'advanced tab' in the editor. It would appear your wysiwyg editor displays only about half of the expected toolbar icons. It might be possible you have a custom CKEditor setup which I believe you mentioned above that you 'dropped in' to your web site. I would highly recommend you restore the /external/editors/ckeditor folder to the files with the shipped version you are using (fwiw, ckeditor v4.6.2 was included in v241 patch #1, patch #3 should be out shortly)

exponentcms commented 4 years ago

The admin issue is strange. Not a major issue, but it would be interesting to find the cause.

I must apologise again for the ckeditor problems - I had forgotten that in trying to fix one problem I inadvertently caused another. Thanks for that, I have done as suggested and all is fine again.

exponentcms commented 4 years ago

Dave. Today I updated this site to patch 5. I only uploaded the patch 5 files and ran the install OK. The editor is once again misbehaving as described at the beginning of this ticket, and the site configuration page will not load. Your email 24/3 said you'd fixed this but didn't tell me which file you changed. Just to be sure I uploaded the ckeditor package from Exponent but that didn't help. Please can you look again. The super admin login I gave you is still there. Thanks.

exponentcms commented 4 years ago

Looks like PHP v5.6 acts differently than 7.0 or 7.1 and it isn't documented. I mostly test in 7.1 and 7.0. Also noticed some logic issues in the new wysiwyg configuration checking. I hope to have a more robust 'check' in the code for the next patch.

Meanwhile I've fixed it on your web site, with a work-around which should also work in the future. Problem was double wrapping the quoted string...so I removed the quotes and concatenation '+'

exponentcms commented 4 years ago

Thank you Dave. Editor working again. Which file did you update please? I would like to make a backup copy, just in case.

We still have the thumbnail problem in FileManager on this and Sandtoft development sites. Any thoughts on that one please?

Peter.

exponentcms commented 4 years ago

Changed the format of the configuration entry from

'Arial/Arial, Helvetica, sans-serif;' +
'Georgia/Georgia, serif;' +
'Verdana/Verdana, Geneva, sans-serif'

to

Arial/Arial, Helvetica, sans-serif;Georgia/Georgia, serif;Verdana/Verdana, Geneva, sans-serif;
exponentcms commented 4 years ago

The javascript configuration parsing/checking code has been updated

exponentcms commented 4 years ago

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