?
avatar joomdonation
joomdonation
17 Jul 2021

Steps to reproduce the issue

  1. Create a new banner
  2. Select an image for it
  3. Save it
  4. Edit the banner again and look at the Image

Expected result

Image previous is being displayed properly

Actual result

At first, it is displaying the text No Image Select (as if the path to the image is wrong) and then about less than one second later, it is being displayed properly

System information (as much as possible)

Joomla 4 nightly build

Additional comments

Maybe when the page is loaded, the wrong preview image is used and the right path is updated later?

avatar joomdonation joomdonation - open - 17 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Jul 2021
avatar dgrammatiko
dgrammatiko - comment - 17 Jul 2021

Image previous is being displayed properly

Loads fine here (tested with local adapter only)

avatar brianteeman
brianteeman - comment - 18 Jul 2021

Not seen any problem here either

avatar joomdonation
joomdonation - comment - 18 Jul 2021

banner_image

Hope it is a problem on my computer only. Here is what happens when I edit a banner which has image selected.

avatar chmst
chmst - comment - 18 Jul 2021

I see the "no image selectedt" message for a moment, then the banner. The image is ok. FF on win10.

banner

avatar dgrammatiko
dgrammatiko - comment - 18 Jul 2021

Ok, observing the page source and the DOM after the JS was executed I have
Screenshot 2021-07-18 at 12 21 32

Screenshot 2021-07-18 at 12 21 48

Basically it's down to these lines

if ($value && file_exists(JPATH_ROOT . '/' . $value)) {
$src = Uri::root() . $value;
} else {
$src = '';
}

We either have to pass the image URL from the HTML helper or remove the hash part manually before checking with the file_exists()

avatar joomdonation joomdonation - change - 19 Jul 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-07-19 05:21:18
Closed_By joomdonation
avatar joomdonation joomdonation - close - 19 Jul 2021
avatar joomdonation
joomdonation - comment - 19 Jul 2021

I made PR #34833 to fix the issue. Please help testing. Thanks !

Add a Comment

Login with GitHub to post a comment