EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Product names/titles missing when upgrading to 4.0.2 #185

Closed gjportegies closed 2 years ago

gjportegies commented 2 years ago

Issue Brief

Product names/titles missing when upgrading to 4.0.2

Environment

Steps to reproduce

  1. Go to the catalog page (PLP)
  2. Look at the product titles.

Actual result

  1. Product titles/names are empty.

Expected result

List the expected results as a bullet list of expectations

Extra notes

I've downgraded to version 4.0.1 again and all product titles/names are showing again.

nwiegers01 commented 2 years ago

I have the exact same problem. Are there already any improvements on this? I also upgraded to version 4.0.2, but it isn't a big improvement.

In version 4.0.1 there is a bug/fault in the filters. When you are on page 5 en will select a filter then they will not work, but this issue is fixed in version 4.0.2.

While this issue is fixed in version 4.0.2, a new issue has been introduced indeed.

Please fix this ASAP, because our client really needs the filtering to work, but also the titles.

nwiegers01 commented 2 years ago

@Hnto , After some investigation we came to the conclusion that this issue is caused by downstream changes to the collection. We needed to clear this collection, otherwise cached data was returned causing the product-titles not to show.


--- a/vendor/emico/tweakwise/Model/Catalog/Layer/ItemCollectionProvider.php
+++ b/vendor/emico/tweakwise/Model/Catalog/Layer/ItemCollectionProvider.php
@@ -83,6 +83,10 @@
                 ;
             }

+            // Due to downstream changes to the collection in the SELECT queries
+            // we needed to clear the collection. Otherwise the cached data is returned.
+            $collection->clear();
+
             return $collection;
         } catch (TweakwiseException $e) {
             $this->log->critical($e);```
Hnto commented 2 years ago

@nwiegers01 Luckily we came to the same conclusion. Thanks for also investigating. A new version has been published v4.0.3