Skip to content

Commit 20e04aa

Browse files
committed
ACP2E-4185: GetCart GraphQL Media Gallery Field Returns Empty Data after cache flush
1 parent b1846f1 commit 20e04aa

File tree

2 files changed

+16
-1
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Product
  • dev/tests/integration/framework/Magento/TestFramework/ApplicationStateComparator/_files

2 files changed

+16
-1
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
use Magento\Store\Model\Store;
2727
use Magento\Catalog\Model\ResourceModel\Category;
2828
use Zend_Db_Expr;
29-
use Magento\Catalog\Model\ResourceModel\Product\Gallery;
3029

3130
/**
3231
* Product collection
@@ -723,6 +722,10 @@ protected function _afterLoad()
723722
$this->_prepareUrlDataObject();
724723
$this->prepareStoreId();
725724

725+
if (isset($this->_selectAttributes['media_gallery'])) {
726+
$this->addMediaGalleryData();
727+
}
728+
726729
if (count($this)) {
727730
$this->_eventManager->dispatch('catalog_product_collection_load_after', ['collection' => $this]);
728731
}

dev/tests/integration/framework/Magento/TestFramework/ApplicationStateComparator/_files/state-skip-list.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@
566566
\Magento\Framework\Stomp\StompClient::class => null,
567567
\Magento\Framework\MessageQueue\QueueRepository::class => null,
568568
Stomp\StatefulStomp::class => null,
569+
\Magento\ProductVideo\Model\ResourceModel\Video::class => null,
570+
\Magento\ProductVideo\Model\Plugin\ExternalVideoResourceBackend::class => null,
569571
],
570572
'placeOrder-fromConstructed' => [
571573
// AMQP message queue objects
@@ -583,4 +585,14 @@
583585
\Magento\Framework\MessageQueue\QueueRepository::class => null,
584586
\Stomp\StatefulStomp::class => null,
585587
],
588+
'applyCouponToCart' => [
589+
\Magento\ProductVideo\Model\ResourceModel\Video::class => null,
590+
\Magento\ProductVideo\Model\Plugin\ExternalVideoResourceBackend::class => null,
591+
\Magento\PageBuilder\Plugin\Catalog\Model\Product\Attribute\RepositoryPlugin::class => null,
592+
],
593+
'mergeCarts' => [
594+
\Magento\ProductVideo\Model\ResourceModel\Video::class => null,
595+
\Magento\ProductVideo\Model\Plugin\ExternalVideoResourceBackend::class => null,
596+
\Magento\PageBuilder\Plugin\Catalog\Model\Product\Attribute\RepositoryPlugin::class => null,
597+
],
586598
];

0 commit comments

Comments
 (0)