Php 搜索不工作-致命错误-magento 2

Php 搜索不工作-致命错误-magento 2,php,magento,search,magento2,Php,Magento,Search,Magento2,我的网站是在Magento版本。2.2.3 早期我的搜索功能工作正常…但从上周开始我突然发现下面有错误消息 致命错误:未捕获错误:调用上的成员函数getNext() 无效 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php:1465 堆栈跟踪:#0 /home/website/public_html/generated/code

我的网站是在Magento版本。2.2.3

早期我的搜索功能工作正常…但从上周开始我突然发现下面有错误消息

致命错误:未捕获错误:调用上的成员函数getNext() 无效 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php:1465 堆栈跟踪:#0 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php(13): Magento\Catalog\Block\Product\ListProduct\Interceptor\Interceptor->\uuuuuu init() #1/home/website/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\Catalog\Block\Product\ListProduct\Interceptor\Interceptor->\uu构造(对象(Magento\Catalog\Block\Product\Context), 对象(Magento\Framework\Data\Helper\PostHelper), 对象(Magento\Catalog\Model\Layer\Resolver), 对象(Magento\Catalog\Model\CategoryRepository\Interceptor), 对象(Magento\Framework\Url\Helper\Data),数组)#2 /home/website/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Catalog…'), 在里面 /home/website/public_html/generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor/Interceptor.php 在线1465

下面是path interceptor.php代码行1465的上方:

我试过:

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的新手-不知道出了什么问题


谢谢

有人能帮你使用opcache、apcu或类似的工具吗?如果是这样,可能只是你需要重新启动apache或php fpm服务。。。
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