Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer Upgrade 2.1.4 -> 2.1.6 Breaks Item Images on Category Pages #9276

Closed
rip057 opened this issue Apr 17, 2017 · 16 comments
Closed

Composer Upgrade 2.1.4 -> 2.1.6 Breaks Item Images on Category Pages #9276

rip057 opened this issue Apr 17, 2017 · 16 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Progress: needs update

Comments

@rip057
Copy link

rip057 commented Apr 17, 2017

Current Versions I am using:
Magento 2.1.6 using the luma theme
PHP 7.0.17 Zend 3.0.0
mysql Ver 15.1 Distrib 10.1.21-MariaDB, for Linux (x86_64) using readline 5.1
Apache/2.4.25 (Fedora)

Upgrading from 2.1.4 -> 2.1.6 (Mind you I have upgraded many times since 1.9.1 ), using composer CLI upgrade method using this guide
http://devdocs.magento.com/guides/v2.1/comp-mgr/cli/cli-upgrade.html
and following it to the T. Results in images on the category pages for the items to be broken.

githubtracker1

you can see the item has a broken link for the picture, and although its not shown it does show the price and the title for the item below it. (sorry for all the masking)

if i got into the backend admin page and find the product in the catalog section and resave it, everything appears fine, but i have something like 65 thousand products, so this is not a viable solution to this issue.

It appears from the inspect element of the broken link that it is infact broken as the is no directory abc160262df37b5fdc3dd1b353c3ece1 inside the cache directory and when i flushed the image cache there is no more cache directory.

Sorry if this isnt proper for a github issue I just dont know what to do, and i dont want to revert back to 2.1.4 as there are security holes.

@LG0012
Copy link

LG0012 commented Apr 18, 2017

Same problem, any solution how to fix this?

@rip057
Copy link
Author

rip057 commented Apr 18, 2017

the very simple solution is to recreate the magento cache images by running

magento catalog:images:resize

I put my server in maintenance mode before running, and for me it took many hours to complete.
why it needs this run and doesnt do it itself is beyond me.

@victorgugo
Copy link
Contributor

@rip057 @LG0012 Thank you for reporting the issue.
Before 2.1.6 inexistent sizes of images for previously saved products were generated on fly on Frontend Category Page.

As of 2.1.6:

  1. Images of all needed sizes are generated during Product Save in Admin panel.
  2. Images are NOT generated on Frontend Category Page on fly.

To get all images generated for existent products while not re-saving all Products you need to run command:
php bin/magento catalog:images:resize

@rip057
Copy link
Author

rip057 commented Apr 19, 2017 via email

@airdrumz
Copy link

I have this issue but magento catalog:images:resize did not work for me. What I've discovered is images that are ticked as "Hide from Product Page" do NOT get processed and stored in pub/media/catalog/product/cache. (In my case, these images are used on the category page but not the product details page.) Not sure of a fix at the moment... any ideas?

@airdrumz
Copy link

airdrumz commented Apr 20, 2017

I have a hacky workaround for my case where 'hidden' images are used on the category page (i.e. the hidden image is also set as the 'base' image.)

  1. On line 1471 of /vendor/magento/module-catalog/Model/Product.php, comment out the continue; and save.
  2. Run php bin/magento catalog:images:resize
  3. Reinstate the continue from step one.
  4. Empty caches.

Is anyone else able to verify this as a bug?

@mattdillon100
Copy link

I am having the same issue. Spent ages debugging my Docker container before reading this (Doh!).
Changing the Magento version to 2.1.5 in the composer.json and running composer update fixed for me.

@hostep
Copy link
Contributor

hostep commented Apr 28, 2017

@airdrumz: I can confirm your issue, we have the same problem on one of our webshops.
Do you care about creating a separate issue for this, because its probably not the same issue as @rip057 was reporting.

@victorgugo: hopefully you are aware of this new issue @airdrumz is reporting?
This is a whole mess which should have never been released in a minor upgrade. I've already nearly spent 2 full days trying to upgrade only 3 shops, this is taking way too long to work around this new image resizing logic, which apparently introduced some new bugs.

@hostep
Copy link
Contributor

hostep commented Apr 28, 2017

UPDATE: Removed temporary workaround for @airdrumz issue from this thread, and moved it to #9498 (comment)

@twistedatrocity
Copy link

@victorgugo

Before 2.1.6 inexistent sizes of images for previously saved products were generated on fly on Frontend Category Page.

As of 2.1.6:

1. Images of all needed sizes are generated during Product Save in Admin panel.
2. Images are NOT generated on Frontend Category Page on fly.

To get all images generated for existent products while not re-saving all Products you need to run command:
php bin/magento catalog:images:resize

The problem is point 1. does not work. When creating a new product or editing an existing product in admin panel, when product is saved Magento is not generating the category view image. Has to be done via CLI every time.

@veloraven
Copy link
Contributor

@rip057 thank you for your feedback.
Is this issue still actual for Magento 2.1.7? There were fixes for images in this version.

@rip057
Copy link
Author

rip057 commented Jun 15, 2017 via email

@romeof1980
Copy link

romeof1980 commented Jun 16, 2017 via email

@rip057
Copy link
Author

rip057 commented Jun 16, 2017 via email

@veloraven
Copy link
Contributor

@rip057 I'm closing this issue as it seems to be fixed from your comment.
If this issue still reproducible please feel free to create the new one: format new issue according to the Issue reporting guidelines: with steps to reproduce, actual result and expected result and specify Magento version.

@prestashoppay
Copy link

Hi ,

Migration 1.7.2 to magento 2.1.6 Images issues :

I am using magento 2.1.6 version , i have same issues product list and view page images path getting blank view .

In admin panel each products having images , but frontend url as like same below ,
example.com/pub/media/catalog/product/cache/f073062f50e48eb0f0998593e568d857/j/6/j6-4_3.jpg

I am using image re-size command via putty , but didn't resize the images in folder .

I am also install support patch regarding images issues , but not installed properly.

Please check in this issues .

Please help me ASAP.

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Progress: needs update
Projects
None yet
Development

No branches or pull requests