Welcome, Guest
Username: Password: Remember me

TOPIC: Richt Text field vs image picker

Richt Text field vs image picker 20 Apr 2012 14:27 #2084

  • jaspero
  • jaspero's Avatar
  • Offline
  • New Member
  • Posts: 8
  • Thank you received: 1
  • Karma: 1
This might be a bug:

If I use both - image picker and a rich-text-field - on a detail form in the backend, there is no image-preview and the chosen image is not saved.

But if I delete the rich-text-field, then the chosen image is displayed as a preview image and it is also be saved.

And this might also help: The richt-text-field was displayed with a grey background instead of the usual white.

I decided now to use a normal textfield instead of a rich-text-one. And it works.
The administrator has disabled public write access.

Re: Richt Text field vs image picker 20 Apr 2012 15:27 #2089

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Yes, you are right, this is caused by the editor and is difficult to solve.

EXPLAINATION :
When you choose an image in com_media popup (image picker), the response callback funstion is :
jInsertEditorText()

To get the result and populate image previews, JDom write this function to catch the result.
BUT, the editor is doing the same for it's owns (To insert images in the text)... And write this same function.
So the conflict occurs and you cannot solve it easily.

While Joomla core does not permit this, Cook will not be able without hacks.

Clean solution : separate your forms or don't use these two in same form.
No issue possible for the moment and it is not a Cook weakness.
Coding is now a piece of cake
The administrator has disabled public write access.

Re: Richt Text field vs image picker 20 Apr 2012 17:39 #2090

  • Frederic
  • Frederic's Avatar
  • Offline
  • Senior Member
  • Posts: 56
  • Karma: 0
Hi everyone,

reading this topic, I was full of hope as I have an image field that does not work with a rich text field in the same form...

I have delete the rich text field but the image field is still not working. What could be the reason ?

Il the image field working in the sandbox?

Thanks in advance,
Regards,

Fred
The administrator has disabled public write access.

Re: Richt Text field vs image picker 20 Apr 2012 18:32 #2091

  • admin
  • admin's Avatar
  • Online
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
I know it is a stupid bug, Joomla is not opened code at this level.

I have an idea to solve it but not for now.

Advantages of the uploader :
Generally, the uploader is a good choice because it reduce considerably the path of the images wich can becomes movables afterwards.

The storage path is written with [DIR_VIEW_VAR]/myImage.png
So the directory can be moved. With the images/ root of the picker you cannot move your images afterwards.

The second advantage of this uploader, is that you can hide more efficiency the paths of your files.

By the way, Joomla com_media picker does not handle an alternative base root, wich make a second problem.

Conclusion : use the uploader !
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.088 seconds

Get Started