Problems with the editor and images

40 views
Skip to first unread message

Ove Eriksson

unread,
Apr 4, 2016, 10:05:12 AM4/4/16
to Joomla! CMS Development
First a B/C matter. Well no break but unexpecred change of behaviour..

I have excluded the Joomla specific buttons from a couple of editor-fields. e.g. I do not allow Images to be inserted from the /images directory. With J 3.5 this became meaningless since the user can drop an image to the field. I can only turn it off globaly.

Or how do I prevent the users from adding images to those fields?

Second: When testing this I found a rather old problem.that I didn't know existed. It might be related to Firefox only but it's still a problem.

I found that JCE has a solution but nothing for it's "Mother" tinyMce.

Test so:
Edit an article using Firefox. No matter if you allow users to drop images or not
- Mark an image file on your desktop for copy with the keyboard Ctl/C ( a small one to start with)
- Click in the editor field and enter Ctl/V on the keyboard to paste the image. The image appears in the editor.
- Now toggle the editor and you'll see a binary base64-encoded image tag.
- Save the article - no problem
- Test with a large image and save the article.
-You'll see something like this error message depending on your size settings for the server..

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1167360 bytes) in D:\xampp\htdocs\joomla_3\libraries\joomla\database\driver.php on line 2050

I think this should be prevented within the editor but maybe also through a filter before saving the field. (JFilterInput or something). Normaly the image upload size is restricted through a setting in the media component.  Here some user can store images where the size is only restricted by system settings --- directly into the database..

Some users do not really know what happens - worse is that some may know how to use it.

Any ideas?

Reply all
Reply to author
Forward
0 new messages