Skip to content

Product image roles randomly disappear #10687

Closed
@boxyman

Description

@boxyman

After upgrading from Magento 2.1.7 to 2.1.8 we had problems with product image roles. We have experienced that some products that previously had product image role set to base, small, thumbnail didn't have it anymore. It seems that the image roles get's removed from random products over time. This weekend at we have at least identified 10 products that got images roles removed during the weekend.

Preconditions

  1. Magento 2.1.8
  2. PHP 7
  3. MySQL 5.7
  4. Ubuntu 16.04
  5. Nginx
  6. Redis
  7. Varnish
  8. SSL (HTTPS)

Steps to reproduce

  1. Go to "Products" > "Catalog"
  2. Choose a product
  3. Go to "Images And Videos"
  4. Click an image
  5. Set "Role" to base, small, thumbnail

Expected result

  1. Product image roles should be set to base, small, thumbnail unless the user changes it.

Actual result

  1. Product image roles disappear randomly from some products from time to time.

Short way to reproduce:

Preconditions

Create product with image and set role image: base, small, thumbnail

Steps to reproduce

Save Product in backend controller like this:

$store = $this->storeManager->getStore(0);
$this->storeManager->setCurrentStore($store);
$product = $this->productRepository->getById($data['product_id'], true, $store->getId());
$this->productRepository->save($product);

Expected result

Product image roles should be set to base, small, thumbnail unless the user changes it.

Actual result

Product image does not have any roles

Metadata

Metadata

Assignees

Labels

Event: dmcdindiaFixed in 2.1.xThe issue has been fixed in 2.1 release lineFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasegood first issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions