首页 > 解决方案 > 搜索不起作用 - 致命错误 - magento 2

问题描述

我的网站在 Magento 版本中。2.2.3

早期我的搜索功能正常工作..但不知道从上周开始我突然收到以下错误消息...

致命错误:未捕获错误:在 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php:1465 中调用 null 上的成员函数 getNext() 堆栈跟踪:#0 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php(13): Magento\Catalog\Block\Product\ListProduct\Interceptor\Interceptor->___init() #1 /home/website/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Catalog\Block\Product\ListProduct\Interceptor\Interceptor->__construct(Object(Magento\Catalog\Block\Product \Context),对象(Magento\Framework\Data\Helper\PostHelper),对象(Magento\Catalog\Model\Layer\Resolver),对象(Magento\Catalog\Model\CategoryRepository\Interceptor),对象(Magento\Framework\Url \助手\数据),数组)#2 /home/website/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Catalog... ',在第 1465 行的 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php

以下是路径interceptor.php代码行1465的上方:

/**
 * {@inheritdoc}
 */
public function ___init()
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, '___init');
    if (!$pluginInfo) {
        return parent::___init();
    } else {
        return $this->___callPlugins('___init', func_get_args(), $pluginInfo);
    }
}

/**
 * {@inheritdoc}
 */
public function ___callParent($method, array $arguments)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, '___callParent');
    if (!$pluginInfo) {
        return parent::___callParent($method, $arguments);
    } else {
        return $this->___callPlugins('___callParent', func_get_args(), $pluginInfo);
    }
}

我试过了 :

rm -rf generated
rm -rf var/cache
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento cache:flush

and then

php bin/magento setup:static-content:deploy -f 
php bin/magento cache:clean
php bin/magento cache:flush

但仍然收到错误消息....作为magento2的新手-不知道出了什么问题...

谢谢

标签: phpmagentosearchmagento2

解决方案


推荐阅读