vienthuong / RecentlyViewedProduct

Recently viewed products plugin for SW6
MIT License
34 stars 10 forks source link

Plugin 'sometimes' breaks down the frontend #13

Open Ambertvu opened 1 year ago

Ambertvu commented 1 year ago

Breaks the page (sometimes) for some reason, throwing the following error in log:

[2023-01-18T10:48:46.125553+00:00] request.CRITICAL: Uncaught PHP Exception TypeError: "RecentlyViewedProduct\Service\RecentlyViewedProductService::saveRecentProductCollection(): Argument #2 ($context) must be of type Shopware\Core\System\SalesChannel\SalesChannelContext, null given, called in /data/web/shopware/custom/plugins/RecentlyViewedProduct/src/Service/RecentlyViewedProductService.php on line 223" at /data/web/shopware/custom/plugins/RecentlyViewedProduct/src/Service/RecentlyViewedProductService.php line 111 {"exception":"[object] (TypeError(code: 0): RecentlyViewedProduct\Service\RecentlyViewedProductService::saveRecentProductCollection(): Argument #2 ($context) must be of type Shopware\Core\System\SalesChannel\SalesChannelContext, null given, called in /data/web/shopware/custom/plugins/RecentlyViewedProduct/src/Service/RecentlyViewedProductService.php on line 223 at /data/web/shopware/custom/plugins/RecentlyViewedProduct/src/Service/RecentlyViewedProductService.php:111)"} [

vienthuong commented 1 year ago

Its also a compatible issue I suppose, which shopware version are you using @Ambertvu