widgetfactory / jce

JCE - A Content Editor for Joomla
https://www.joomlacontenteditor.net
GNU General Public License v2.0
35 stars 12 forks source link

Stylesheets should be added with text/stylesheet #73

Closed zero-24 closed 4 years ago

zero-24 commented 4 years ago

Describe the bug

The ui.css file is included and set as text/html wich is beeing blocked in modern setups as it should be marked as text/csst. image

To Reproduce Steps to reproduce the behavior:

  1. Go to https://tm.joomla.org/contact.html
  2. See the message from above in the browser console

Expected behavior CSS is included and applied correctly

Screenshots

image

Desktop (please complete the following information):

Additional context

It seams you are not using the joomla core addStylesheet method https://github.com/widgetfactory/jce/blob/2393a57a691f698217cae624cbb23af2a32700fc/components/com_jce/editor/libraries/classes/editor.php#L356 that would take care of that mime type thing automatically.

ryandemmer commented 4 years ago

Actually, the stylesheets are being added using the code addStylesheet method, see https://github.com/widgetfactory/jce/blob/master/plugins/editors/jce/jce.php#L100

ryandemmer commented 4 years ago

There is an error in the url for the ui.css stylesheet in the screenshot you included, which is most likely producing a 404 error, and therefore the MIME type message.

This may be due to a mis-configuration of the editor in that form.

zero-24 commented 4 years ago

Thanks for the update :)

Actually, the stylesheets are being added using the code addStylesheet method, see

Ah on a quick check i just saw: https://github.com/widgetfactory/jce/blob/2393a57a691f698217cae624cbb23af2a32700fc/components/com_jce/editor/libraries/classes/editor.php#L62-L65 ;)

So one more thing to check thanks.

zero-24 commented 4 years ago

Do you want us to close here and handle it in the joomla-webseites repo? Or do you want to keep this open until resolved?

ryandemmer commented 4 years ago

The url in question should look something like this:

tiny_mce/themes/advanced/skins/modern/ui.css

but there appears to be an issue with setting the "skin" value, not sure why.

Whoever has access to configure the editor on that site, can check and reset the Toolbar Theme for the editor in Editor Profiles -> Features & Layout.

zero-24 commented 4 years ago

Thanks I'm going to forward this to Luca.

ryandemmer commented 4 years ago

They can contact me directly using this form - https://www.joomlacontenteditor.net/contact/administrator

zero-24 commented 4 years ago

Thanks 👍