Skip to content

Commit

Permalink
Merge pull request #679 from Nosto/hotfix/4.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
supercid authored May 27, 2020
2 parents 28fef12 + 6834a29 commit ccec333
Showing 4 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

# 4.0.8
* Add null guard for caching product service in case the product data building fails for dirty product

# 4.0.7
* Handle empty / invalid product cache entries and possible failures in product data building gracefully

10 changes: 10 additions & 0 deletions Model/Service/Product/CachingProductService.php
Original file line number Diff line number Diff line change
@@ -110,6 +110,16 @@ public function getProduct(ProductInterface $product, StoreInterface $store)
//If it is dirty rebuild the product data
if ($cachedProduct->getIsDirty()) {
$cachedProduct = $this->nostoCacheService->rebuildDirtyProduct($cachedProduct);
if ($cachedProduct == null) {
$this->nostoLogger->debug(
sprintf(
'Unable to rebuild dirty cache entry for product #%s for store %s',
$product->getId(),
$store->getCode()
)
);
return null;
}
}
//Check that we actually got serializable data
$productData = $cachedProduct->getProductData();
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "nosto/module-nostotagging",
"description": "Increase your conversion rate and average order value by delivering your customers personalized product recommendations throughout their shopping journey.",
"type": "magento2-module",
"version": "4.0.7",
"version": "4.0.8",
"require-dev": {
"php": ">=7.1.0",
"phan/phan": "0.8.8",
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -37,5 +37,5 @@
<!--suppress XmlUnboundNsPrefix -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Nosto_Tagging" setup_version="4.0.7"/>
<module name="Nosto_Tagging" setup_version="4.0.8"/>
</config>

0 comments on commit ccec333

Please sign in to comment.