Pearl Theme doesn't work with latest Magento 2.3.4 with cache enabled
After updating Magento to 2.3.4 we get the following error in nginx logs as soon as we enable caching:
PHP message: PHP Fatal error: Uncaught Error: Call to undefined method WeltPixel\NavigationLinks\Plugin\Block\Topmenu::afterGetCacheKeyInfo() in /var/www/html/htdocs/vendor/magento/framework/Interception/Interceptor.php:146
Stack trace:
#0 /var/www/html/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): WeltPixel\NavigationLinks\Block\Html\Topmenu\Interceptor->Magento\Framework\Interception\{closure}()
#1 /var/www/html/htdocs/generated/code/WeltPixel/NavigationLinks/Block/Html/Topmenu/Interceptor.php(195): WeltPixel\NavigationLinks\Block\Html\Topmenu\Interceptor->___callPlugins('getCacheKeyInfo', Array, Array)
#2 /var/www/html/htdocs/vendor/magento/framework/View/Element/AbstractBlock.php(1038): WeltPixel\NavigationLinks\Block\Html\Topmenu\Interceptor->getCacheKeyInfo()
#3 /var/www/html/htdocs/generated/code/WeltPixel/NavigationLinks/Block/Html/Topmenu/Interceptor.php(713): Magento\Framework\View\Element\AbstractBlock->getCacheKey()
#4 /var/www/html/htdocs/vendor/magento/framework/View/El
The site runs fine as soon as we disable caching. Other themes seem to work fine.
-
Official comment
Hey guys! Nice to see you finding solutions together.
This issue has now been fixed. The fix was introduced in version 1.9.4 of the theme, so if you're experiencing this error, make sure you're using the latest version. The latest version currently stands at 1.9.5, and you can check out everything that was introduced/fixed in our Change Log article here: https://support.weltpixel.com/hc/en-us/articles/115002963573-WeltPixel-Product-Updates-Change-Log-and-New-Releases
Comment actions -
Hello
It's the same with apache 2.4Fatal error: Uncaught Error: Call to undefined method WeltPixel\NavigationLinks\Plugin\Block\Topmenu::afterGetCacheKeyInfo() in /var/www/html/xxx/vendor/magento/framework/Interception/Interceptor.php:146 Stack trace: #0 /var/www/html/xxx/vendor/magento/framework/Interception/Interceptor.php(153):
WeltPixel\NavigationLinks\Block\Html\Topmenu\Interceptor->Magento\Framework\Interception\{closure}() #1 /var/www/html/xxx/generated/code/WeltPixel/NavigationLinks/Block/Html/Topmenu/Interceptor.php(52): WeltPixel\NavigationLinks\Block\Html\Topmenu\Interceptor->___callPlugins('getCacheKeyInfo', Array, Array) #2 /var/www/html/xxx/vendor/magento/framework/View/Element/AbstractBlock.php(1038): WeltPixel\NavigationLinks\Block\Html\Topmenu\Interceptor->getCacheKeyInfo() #3 /var/www/html/xxx/vendor/magento/framework/View/Element/AbstractBlock.php(1132):
Magento\Framework\View\Element\AbstractBlock->getCacheKey() #4 /var/www/html/xxx/vendor/magento/framework/View/Element/AbstractBlock.php(673):
Magento\Framework\View\El in /var/www/html/xxx/vendor/magento/framework/Interception/Interceptor.php on line 146If you have the solution I am interested
-
Hi guys,
I removed recently added code from a Magento file to get this working, until Weltpixel offer an official solution.
Please see file /vendor/magento/module-catalog/Plugin/Block/Topmenu.php
and remove or comment out the following function:
/**
* Add active
*
* @param \Magento\Theme\Block\Html\Topmenu $subject
* @param string[] $result
* @return string[]
*/
public function afterGetCacheKeyInfo(\Magento\Theme\Block\Html\Topmenu $subject, array $result)
{
$activeCategory = $this->getCurrentCategory();
if ($activeCategory) {
$result[] = Category::CACHE_TAG . '_' . $activeCategory->getId();
}return $result;
}Make sure you so not delete the last Curly Bracket in file!
-
Considering 2.3.4 is a security release, I believe it is far more damaging to expect customers to remain on previous versions of Magento that are publicly accessible.
If they sit and wait for the release of the new Weltpixel pearl theme, their website is either vulnerable or non functioning, therefore I provided them with a simple fix that ensures their website is fully patched and they can continue trading.
I would 100% agree it is never ideal to modifying Magento's core files, but as a temporary measure, I believe this will be a solution for your customers, they just have to remember to put in all back in place upon the release of pearl 1.9.3
-
Hi,
I also have big problems with Magento 2.3.4 and WeltPixel Theme.
When regenerating the LESS and CSS files I get an Error 500 http://prntscr.com/r2s98o
http://prntscr.com/r2s9ox
http://prntscr.com/r2sbij- With setup: static-content: deploy, WeltPixel gives me a LESS error in every language. These errors are not displayed in Luna and blank Magento.
http://prntscr.com/r2seml- The categories are no longer displayed. Blank page.
I will revert to version 2.3.3. The theme still seems to have big problems, although WeltPixel has already written that is compatible with 2.3.4 !!!
Please sign in to leave a comment.
Comments
10 comments