Magento2: After upgrade Magento 2.1.6 images of simple products (dropdown) do not display anymore

Created on 17 Apr 2017  Â·  35Comments  Â·  Source: magento/magento2

Upgraded to Magento 2.1.6
Using Infortis Ultimo Theme, latest available version

Steps to reproduce:

  1. Create a configurable product with attribute type 'dropdown'
  2. Create the underlying simple products and upload images
  3. Select the configurable product in the front end
  4. Select one of the values of the attributes from the drop down box

Expected result:

  1. Image of corresponding simple product should display after selecting attribute value

Actual result

  1. System shows that it is loading the image
  2. Delivers empty image area

This used to work flawlessly before upgrading to 2.1.6
Image switching still works fine for image or text swatches and combinations

Fixed in 2.1.x Format is not valid Ready for Work needs update

Most helpful comment

Hi @martijnhovinga

I'm not an Magento employee, but I agree that this should be mentioned as a very clear warning in the release notes. Because this change seems to introduce significant issues which nobody was expecting (I didn't actually test it myself, but I've seen multiple issues popping up here on github around the same problem)

cc: @tanberry, @jfrontain

All 35 comments

@martijnhovinga: have you also tested this on the default Blank and/or Luma themes which come with Magento2? If not: would you like to test it first using one of these two themes?
My suspicion is that the problem is probably in your custom theme (or custom modules if you have those). It's always best if you try to reproduce the issue in a clean Magento installation. This way you can be sure that it is actually a bug in Magento itself and not in some 3rd party theme/module.
In case you have tested it on a clean Magento installation, feel free to update your issue by mentioning this so it is clear from the start. :)

Thanks!

Same problem.. Any solution how to fix this?

@LG0012: Please confirm whether you have tested it with default Blank or Luma Theme? I haven't yet (I am using Infortis Ultimo, but am quite confident the theme is not causing it, as it worked fine before with the same theme)

For us, after magento upgrade from 2.1.3 to 2.1.6 there is issue then running bin/magento indexer:reindex, it ruins all swatch images, they just became blank color swatches instead of image swatches. But then you clear cache, these images starts to show up...

try running this
magento catalog:images:resize

i had a lot of image problem after i upgraded to 2.1.6 and this fix them all

it will take a loooooooooooonnnngg time to run if you have a lot of images, but again, it fixed all of my problems

@rip057 I have tried to run it, but it didn't helped... Strange thing is that for some reason some of image swatches works, and other one's just disappears after some time after cache clean ...

I just created a NEW configurable product with drop down attribute and that works fine, i.e. images of underlying simple products show up. Have yet to run the images;resize command and will let you know. Thanks for the tip.

Running magento catalog:images:resize and restarting varnish worked for me.

It took a long time. But running _magento catalog:images:resize_ solved the issue indeed. Thank you @rip057

Yeah it took me many many hours to complete

On Apr 18, 2017 6:38 PM, "Martijn Hovinga" notifications@github.com wrote:

It took a long time. But running magento catalog:images:resize solved
the issue indeed. Thank you @rip057 https://github.com/rip057

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/9275#issuecomment-295015932,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ0VcoAy0So4XeZVDeLc-GRVXwY4YcqQks5rxUlxgaJpZM4M_Msw
.

@hostep I encountered a problem with images as well after upgrading to 2.1.6 in a plain vanilla Magento 2.1.x installation. The images did not display at all. Running the command below also solved this.

As this is obviously not related to the theme or extension, I recommend to add to your version 2.1.6 upgrade notes "to please run _magento catalog:images:resize_ after upgrading, if you encounter any issues with images.

Hi @martijnhovinga

I'm not an Magento employee, but I agree that this should be mentioned as a very clear warning in the release notes. Because this change seems to introduce significant issues which nobody was expecting (I didn't actually test it myself, but I've seen multiple issues popping up here on github around the same problem)

cc: @tanberry, @jfrontain

I am having the same problems on version 2.1.6.
running php bin/magento catalog:images:resize fixed the problem but there are still a lot of error logs in my browser console.

jquery.js?bust=v213-000:1471 Uncaught Error: Syntax error, unrecognized expression: # option:selected at Function.Sizzle.error (jquery.js?bust=v213-000:1471) at tokenize (jquery.js?bust=v213-000:2085) at select (jquery.js?bust=v213-000:2473) at Function.Sizzle [as find] (jquery.js?bust=v213-000:880) at jQuery.fn.init.find (jquery.js?bust=v213-000:2684) at jQuery.fn.init (jquery.js?bust=v213-000:2801) at jQuery.fn.init (jquery-migrate.js?bust=v213-000:225) at jQuery (jquery.js?bust=v213-000:75) at HTMLSpanElement.<anonymous> (add-to-wishlist.js?bust=v213-000:66) at Function.each (jquery.js?bust=v213-000:384)

this occurs on every dropdown change.

Thank you @martijnhovinga and all above very much for this information. We will work with the dev team to add info to the Release Notes.

We've just published a revision of the 2.1.6 Release Notes that includes this information. Thanks so much for your help!

@jfrontain: good, tnx!

Is there any news from the developers if this change is going to be reverted? As this breaks backwards compatibility in a minor release. Or at least add a configuration switch where we can choose to let the images generate during a page request, and not only when saving a product or running catalog:images:resize?
Imagine upgrading a Magento shop with 50.000 products, each having at least one image, you know how long it takes to run catalog:images:resize? Probably a full day, if not more, so the shop wouldn't have all the images for many many hours until this command has finished running.
Also: what happens when we import products using the ImportExport functionality? Are images getting generated as well, or do we have to manually run catalog:images:resize after every product import to be sure that all images are generated?

I haven't tested out version 2.1.6 yet, but plan on doing so in a couple of days, so all the above is speculation, because I didn't really test anything yet.

Hi just tested the catalog:images:resize and confirm it's working. But, it took 26 hours on my VPS to process 1200 products with 5 to 10 images each.

I would also like to add that any configurable product created via import/export won't work unless you manually visit the simple product page so the cached image can be created or until you run de catalog:images:resize command.

If you create a configurable product via the catalog page, everything will work. But if you delete the cache folder, images won’t be recreated until you visit the simple product page or run the catalog:images:resize.

Hi,
After the update to 2.1.6 our shop doesn't show pictures in the catalog on the front side and no thumbnails in the product catalog on the back end.
When I right click an 'image' it says 403 forbidden by nginx, this goes for the front- and back end.

catalog:images:resize doesn't do the trick for our shop.

Hi,
I can confirm that this is an issue that is commented, I don't know if it is connected to the original reported issue, but I happens for all of our staging/development/production sites we have. It dosen't seem to only be product images, but also images that are comming from third-party modules to in the pub/media folder.

Edit:
Ok just noticed this page as described above, but it I want to highlight it if anyone else has the same issue:
http://devdocs.magento.com/guides/v2.1/release-notes/tech_bull_216-imageresize.html

A little bit late to this one but we've just published a post on this here, hopefully it helps out.
http://bit.ly/2ryHXnI

There's also another issue in this ticket which I think wasn't addressed (but I'll probably create another issue for it): product swatch images on configurable products only show up the first page-hit after you clear the cache (with FPC off), and then revert back to swatch colours (even though the swatch image has been set on the simple product). I've reindexed, run the catalog:image:resize command, cleared the cache many times, but it insists on using the swatch colour instead of the image. This is only on product pages - on category pages it seems to work fine.

@sensejus did you manage to figure that one out?

edit: actually, it doesn't matter whether it's on category or product pages - on the first page-hit image swatches show up correctly, and after that it reverts back to colour swatches, no matter whether you're on the product or category page.

Magento just released 2.1.7 with a "reversion of the changes to image resizing that we introduced in 2.1.6": http://devdocs.magento.com/guides/v2.1/release-notes/ReleaseNotes2.1.7CE.html

Can you please check if the problem is gone in 2.1.7? Thanks!

Everything is fine for me with the 2.1.7 update.

Thanks to the devs!

2.1.7 - exact same issue as erfanimani - only first hit after cache flush shows swatches correctly - all pages after are black or use non-product image swatches.

@erfanimani @dawhoo
Hi! Please can you create a separate issue for your problem? This should help the core team focus on it. Otherwise it might get lost inside this ticket.

Thanks!

@martijnhovinga this issue should be fixed in Magento 2.1.7. Could you please confirm that you do not experience it anymore?

@erfanimani , @dawhoo if you experience another issue even connected with this one, please create separate GitHub issue and format it according to template: with steps, actual and expected results and environmentdescription.

Thanks @veloraven The issue is now fixed for me after upgrade to 2.1.7

There is now an official patch for 2.1.6:
(https://magento.stackexchange.com/questions/174964/magento2-how-to-install-patch-ce-magetwo-67805-patch)

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.

@prestashoppay: please use a newer version of Magento to upgrade to. The image resize changes in Magento 2.1.6 turned out to be very buggy and were reverted again in version 2.1.7, I'd recommend you to upgrade to the latest version of 2.1.x (2.1.9 currently)

Hi @hostep ,

Thanks for your reply.

I am using following commands magento upgrade 2.1.6 to 2.1.7 , and also 2.1.9

I am getting error below command run via putty ,

composer require magento/product-community-edition 2.1.7 composer update

PFA
error

`./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Conclusion: don't install magento/product-community-edition 2.1.7
- Conclusion: remove magento/framework 100.1.6
- Conclusion: don't install magento/framework 100.1.6
- Installation request for magento/product-community-edition 2.1.7 -> satisfiable by magento/product-community-edition[2.1.7].
- Conclusion: don't install magento/framework 100.1.6
- magento/product-community-edition 2.1.7 requires magento/framework 100.1.7 -> satisfiable by magento/framework[100.1.7].
- Can only install one of: magento/framework[100.1.6, 100.1.7].
- Can only install one of: magento/framework[100.1.6, 100.1.7].
- Installation request for magento/framework (locked at 100.1.6) -> satisfiable by magento/framework[100.1.6].

Installation failed, reverting ./composer.json to its original content.`

How to upgrade magento 2.1.6 to magento 2.1.9 or latest version

Please help me asap .

@prestashoppay: please ask support questions on https://magento.stackexchange.com/ or https://community.magento.com/, GitHub isn't the place to ask these kind of questions, thanks! :)

@hostep ,

Thanks for your reply.

Hello

Was this page helpful?
0 / 5 - 0 ratings