Jump to content

Images broken in CC storefront


Recommended Posts

Hi there — my client is having an issue with his store (www.heyday-mo.com); here's his description of what happened:

Quote

 

I was working on the site adding products, and all was fine until suddenly I couldn't upload images. I checked the file manager and clicked on images, but it's now a blank page. Seems like a link of some kind has broken. I've tried clearing the cache, but still nothing  comes up. The images are all still present in the catalogue, except for the product where things stopped working. I looked in the error log and it looks like something has happened with the PHP. 

I definitely think it's something to do with the uploaded image. The image was ticked to say it had uploaded, but then nothing happened and the list of images in file manager disappeared.

 

The image was apparently just a jpeg, so I don't see how that could have caused such an issue... products can still be added, but the images don't display. Any ideas? The site is using 6.2.9; the Cubecart install was up to date at the tine of the issue and has not been updated since. 

Link to post
Share on other sites

The error_log may still offer a clue as to why, in admin, Images, the "Image Filemanager" is not showing a list of image filenames - any image filenames.

Link to post
Share on other sites

All I'm seeing in the error log is 

[Exception] /home1/heydaymo/public_html/catalog/classes/gd.class.php:118 - Call to undefined function imagecreatefromwebp()

Does that help?

Link to post
Share on other sites

That's a known issue:

https://github.com/cubecart/v6/issues/2431
https://github.com/cubecart/v6/issues/2443

Until your hosting provider changes your hosting environment to include WEBP images, this edit will remove the statements causing this error. The downside is that you must not use 'webp' type images.

In /classes/gd.class.php, lines 118 and 205:

From:
$this->_gdImageSource = imagecreatefromwebp($file);

To:
// $this->_gdImageSource = imagecreatefromwebp($file);

From:
$this->_gdImageSource = imagewebp($im, $file, $this->_gdJpegQuality);

To:
// $this->_gdImageSource = imagewebp($im, $file, $this->_gdJpegQuality);

 

Link to post
Share on other sites
Posted (edited)

Ah, so it was the file type! What is the best way to fix it? Will deleting the product listing be sufficient to take care of the issue?
(Update — I deleted the problem item, but the image problem remains; images still don't appear after uploading)

Edited by jvbh
Link to post
Share on other sites
On 6/24/2020 at 6:19 PM, bsmither said:

Until your hosting provider changes your hosting environment to include WEBP images

This or move to a hosting provider that supports Webp image types !  Give us a shout if you are interested in moving over to us !

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...