VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: iWim on January 06, 2025, 12:17:36 PM

Title: [FIXED] [4.4.4] [Bug] - Empty url to image after saving product
Post by: iWim on January 06, 2025, 12:17:36 PM
After saving a product with an image, the url to the image is empty.
<img src="/" ...>The image does exist.

The shop will now (of course) display the missing image image.

Clicking the missing image image displays the correct (large) image.
(Not in a modal, but in the same browser window as the shop. Maybe another bug? I need to check that better)

VM4.4.4
J5.2.2

Edit:
The not opening an image in a modal seems to only happen when the missing image image is displayed.
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: WebStuff on January 06, 2025, 15:19:23 PM
I am having the same issue but only on newer products.
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: Roderic on January 06, 2025, 15:24:31 PM
I think it's due to the new checkbox, that is not automatically checked.

"added property "isImage" for medias, works BC"
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: Jumbo! on January 06, 2025, 16:24:16 PM
Quote from: Roderic on January 06, 2025, 15:24:31 PMI think it's due to the new checkbox, that is not automatically checked.

"added property "isImage" for medias, works BC"

Yes, that's right. It will be fixed in the upcoming update, which will be released soon.
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: WebStuff on January 06, 2025, 18:16:07 PM
It seems that all my #__virtuemart_medias database entries had been cleared for some reason either during the update to vm4.4.4 or possibly when I tried using the "Synchronise media to Virtuemart" button under SHOP to resolve it.
Luckily I had a backup of the table and once restored my product images are back.
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: WebStuff on January 06, 2025, 18:58:13 PM
After a  bit of research there is some sort of "error" on the product edit page that when saving any new product information if that checkbox mentioned by  Roderic isn't ticked the image disappears but the good news is that it comes back if you tick the box and save again.
Should really be ticked by default in my opinion devs. :)

Hope this helps.
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: iWim on January 07, 2025, 10:05:52 AM
Thank you.
I also see the notes in the news article.

Looking forward for the update.

To confirm:
Checking COM_VIRTUEMART_FILES_FORM_FILE_ISIMAGE does display the image again.

Notes:
* Language files have not been updated with the new LANGUAGE_CONSTANT yet (en-GB/nl-NL).
What should it translate to? "Is image"?

** As I see it now you have to check that an image, in the block IMAGE information, under tab Product IMAGES is in fact an IMAGE... :o
Let's not add options for the sake of adding options.
When a new option is added explain why it was added and what its purpose is.

Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: WebStuff on January 08, 2025, 23:46:05 PM
Well I've just had a manager on the phone to me that had put on 200 products and none of the images were showing up as they had never had to tick that box before nor even noticed it this time.
Easy fix now I know what it is but this is the sort of thing that will happen with these ill-conceived updates.
Title: Re: [4.4.4] [Bug] - Empty url to image after saving product
Post by: fotonio on January 15, 2025, 09:03:22 AM
If you understand mysql language you can go to virtuemart_medias table in your DB and run this query:
UPDATE `_virtuemart_medias` SET `is_image`=1 WHERE `virtuemart_media_id`> your media id number here.

Setting is_image=1 is the same with ticking the box in the product edit and save.