Summary


the mod_custom module of the administration doesn't display images
Images don't appear in the admin 'cpanel' while they do in the text editor.

This is systematic.


How did I found this:
I want to display a nice looking HTML text in the 'cpanel' of the administration.
In order to say hello to people logging in, and also to give them some important info.
-> I went in the 'Administration' part of module management.
-> created a Custom HTML Module
-> put it in the 'cpanel' position
-> wrote some text, inserted some images, saved.--> the module and the text shows up properly in the 'cpanel'.
--> But all images are broken, showing an empty zone.
I triple checked, changed of TextEditor... Same result always.
Disabled many extensions... Tried to store my image in a different folder...
This module is not able to display the images, wherever you put them !!
Even if you place them à the root of the website, on in the 'Administration' folder...
One not handy solution
-> go into the HTML mode of the Text editor
-> put the full link of the picture (http://...../.../image.jp)
-> save under the HTML mode
If you go back in the 'wysiwyg' mode before saving, the text editor eats the full path and transforms it in the '/i..../..../image.jpg) and the image will not show up...It is really not handy.
Nor really logical. At least we should be able to place 'Administration' picture in one path, where the text editor would be able to load image... This prvent trial & error page creation and update (I plan to update those modules often)...
Joomla is astonishing tool, but the Administration part is still a little behind in terms of flexibility.
Being able to communicate to user logging in is of major importance. We should really be able to display things easily there.
Anyone get a solution?
Can this be considered as a bug (in my opinion, yes)?
Can I have some hope to see this solved 
Many thanks in advance for all your effort,
And also for the great Joomla 3.2.2
Let me know if I can be of help on this...

D.

 
Opened On:
15 Feb 2014, 15:46 by Dominique Morel
Closed On:
13 Mar 2014, 4:38
Status:
Fixed in SVN/GitHub

Filed Under

  • Administration
  • Easy
  • First
  • No Platform Implications
  • Second

Responses

Posted on 16 Feb 2014, 8:52 by Tobias Zulauf

Hi Dominique,

i can confirm the issue here.

A temporary fix could be to use the general /images folder to store your images and use at the modul code like this:

<img src="/../images/yourfolder/yourimage.jpg" />

So at the cpanel modul it will work but you can't see the image at the WYSIWYG Editor.
Posted on 16 Feb 2014, 9:19 by Thomas Hunziker

You can disable the editor and prepend the image path with the "../". Then it will stick.

The problem is that the editor doesn't know that the text you're writing will show in backend. The WYSIWYG editor expects that it's shown in the frontend. There is likely not much we can do here in the editor to make that work.

But if someone is interested to fix it, one could try some str_replace or regex in the backend mod_custom module. I'm not sure how easy it would be to make it fool-proof but it's the only solution I see at the moment.
Posted on 16 Feb 2014, 11:35 by Tobias Zulauf

Hi Dominique,

can you have a look to this patch?

https://github.com/joomla/joomla-cms/pull/3125

https://github.com/joomla/joomla-cms/pull/3125.diff

Please share your result with a @test comment.

 

Thanks :)

Pending since we have the patch #3125
Posted on 16 Feb 2014, 12:06 by Marc Antoine Thevenet

@test

able to reproduce then #3125 works as expected (tried with: <img src="/images/joomla_black.gif" alt="" />) - thanks

set first test
Posted on 18 Feb 2014, 18:52 by Denise McLaurin

@test

Able to reproduce the problem as reported.  #3125 resolves the issue.

Set 2nd test.
Posted on 19 Feb 2014, 1:09 by Tobias Zulauf

Thanks Marc and Denise,

since we have 2 successful tests i move this here to RTC.
Posted on 6 Mar 2014, 14:25 by Dominique Morel

Hi all !

First, sorry for late feedback (didn't receive updates in my mailbox, and amazed by the fact that you have already worked on that).

Second: are really you the guys building / fixing my beloved Joomla! ? Can't believe that I'm talking with you :-)

Third: not sure I did what I had, but I pasted the lines mentionned in #3125 in the proper mod_custom.php... And it does work now!! I am able to use the wysiwyg editor to plave images in those administrator custom module. That's already a big 'YES!'.

However, correct me if I'm worng, that's forcing me to place those images in the '/images/' folder... My trials show that this fix only works if images are inside that precise folder. But... there's a but...

Those image are intended to be used in admin modules only, reason why I would like to be able to place them outside that /images/ folder as this one is mainly uses for the public site. That's the only folder that my customers have access to, and would really love to avoid them to see 'my' admin files... (I'm sure that at some point some of my clients will delete or move them...)

 

Do you see what I mean?

Is there a solution for this?

Can I anyway use the fix the way it is now, and will it be integrated in next Joomla release making all my future changes in those modules working smoothly ??

Many thanks again for all the fabulous work, and for your reactivity on this (I really thought it would take monthes !!)

Thank you all,

Dominique
Joomla lover

 

 

 
Posted on 13 Mar 2014, 4:38 by Jean-Marie Simonet

Merged. Thanks!
@Dominique Morel
You may create a module override and change the code to fit your specific image folder.
For example if you place some admin images in ROOT/admin_images/ and enter in the custom module:
<p><img src="/admin_images/myimage.gif" alt="whatever" /></p>
Then your override would consist in changing:
$module->content = preg_replace('*src\=\"(?!administrator\/)images/*', 'src="../images/', $module->content);
to
$module->content = preg_replace('*src\=\"(?!administrator\/)admin_images/*', 'src="../admin_images/', $module->content);
 
Posted on 16 Dec 2014, 15:15 by Dominique Morel

Hi Team,

Quickly after my last post, a new Joomla version solved that issue : I have been able to select image via the Editor and insert it without further issue.

THANKS !!!

However... The bug is still here regarding the 'ONMOUSEOVER' or 'ONMOUSEOUT' instruction.


If -for instance- I use the great JCE Editor to create a nice 'Welcome in ADMIN' page for my customers (something that is missing too often) with some info / instruction on how to use Joomla and if I insert image (like in a normal article) then it is now all good. Images stay and I don't have to edit the code and insert the real path to it (see above).

But if I inesrt via JCE a MOUSEOVER instruction for the 'Tools' (shortcuts for my customers) then the image path is not working for the system. 'MOUSEOVER' just don't show up. Instead, a 'no picture' image shows up. I have to edit the code and place the full 'www....' path for the picture to display.

In the end it is more or less teh same problem than above, but now only on MOUSEOVER and MOUSEOUT image paths.

It would be great if this can be corrected : the 'Admin' interface is way too often neglected by webmasters while it is a very important (and stressfull) place for our customers, and we should be able to provide them a nice and calm place with clear and good looking instructions.

Joomla is already doing a much better job than WordPress on this. Lets move forward and fix those little bugs.

 

Many thanks in advance.

If I can help, please let me know.

 

Cheers
Dominique