早上好,我在checkout/cart中找到这个类时遇到了一些问题。由于某种原因,这个块在localhost中不存在,但在生产中存在(从生产中获得了新的转储)。我已经清除了所有已清除的静态内容,清除了缓存,还检查了是否有任何cms或块调用了这个类,但我找不到原因。
Exception #1 (ReflectionException): Class AmastyMostviewedBlockWidgetWrapper does not exist
#1Magento\Framework\Code\Reader\ClassReader->getConstructor()调用于[vendor/Magento/Framework/ObjectManager/Definition/Runtimephp:54]#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters()调用于[vendor/Magento/Framework/ObjectManager/Factory/Compiled.php:100]#3在[vendor/Magento/Framework/ObjectManager/ObjectManager.php调用的Magento\Framework\ObjectManager\Factory\Compiled->create():56]#4 Magento\Framework\ObjectManager\ObjectManager->create()调用于[vendor/Magento/Framework/View/Element/BlockFactory.php:44]#5在[vendor/Magento/Framework/View/Layout/Generator/Block.php:272]调用的Magento\Framework\View\Element\BlockFactory->createBlock()#6在[vendor/Magento/Framework/View/Layout/Generator/Blockphp:252]调用的Magento\Framework\View\Layout\Generator\Block->getBlockInstance()#7 Magento\Framework\View\Layout\Generator\Block->createBlock()调用于[vendor/Magento/Framework/Interception/Interceptor.php:58]#8 Magento\Framework\View\Layout\Generator\Block\Interceptor->___callParent()调用于[vendor/Magento/Framework/Interception/Interceptorphp:138]#9 Magento\Framework\View\Layout\Generator\Block\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/amasty/module-fpc-warmer/Plugin/Holepunch/BlockArguments.php:57]#10 Amasty\Fpc\Plugin\Holepunch\BlockArguments->aroundCreateBlock()调用于[vendor/magento/framework/Interception/Interceptorphp:135]#11 Magento\Framework\View\Layout\Generator\Block\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/Magento/Framework/Interception/Interceptor.php:153]#12 Magento\Framework\View\Layout\Generator\Block\Interceptor->___callPlugins()调用于[generated/code/Magento/Framework/View/Layout/Generator/Block/Interceptor.php:23]#13 Magento\Framework\View\Layout\Generator\Block\Interceptor->createBlock()调用于[vendor/Magento/Framework/View/Layout/Generator/Block.php:229]#14 Magento\Framework\View\Layout\Generator\Block->generateBlock()调用于[vendor/Magento/Framework/View/Layout/Generator/Block.php:134]#15 Magento\Framework\View\Layout\Generator\Block->process()调用于[vendor/Magento/Framework/View/Layout/GeneratorPool.php:93]#16 Magento\Framework\View\Layout\GeneratorPool->process()调用于[vendor/Magento/Framework/View/Layout.php:365]#17 Magento\Framework\View\Layout->generateElements()调用于[vendor/Magento/Framework/Interception/Interceptor.php:58]#18 Magento\Framework\View\Layout\Interceptor->___callParent()调用于[vendor/Magento/Framework/Interception/Interceptorphp:138]#19 Magento\Framework\View\Layout\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/Magento/Framework/Interception/Interceptorphp:153]#20 Magento\Framework\View\Layout\Interceptor->___callPlugins()调用于[generated/code/Magento/Framework/View/Layout/Interceptor.php:32]#21 Magento\Framework\View\Layout\Interceptor->generateElements()调用于[vendor/Magento/Framework/View/Layout/Builder.php:129]#22 Magento\Framework\View\Layout\Builder->generateLayoutBlocks()调用于[vendor/Magento/Framework/View/Page/Builder.php:65]#23 Magento\Framework\View\Page\Puilder->generateLayoutBlocks()调用于[vendor/Magento/Framework/View/Layout/Builder.php:65]#24 Magento\Framework\View\Layout\Builder->build()调用于[vendor/Magento/Framework/View/Page/Config.php:227]#25 Magento\Framework\View\Page\Config->build()调用于[vendor/Magento/Framework/View/Page/Config.php:250]#26 Magento\Framework\View\Page\Config->getTitle()调用于[vendor/Magento/module-checking/Controller/Cart/Index.php:57]#27 Magento\Checkout\Controller\Cart\Index->execute()调用于[vendor/Magento/framework/Interception/Interceptor.php:58]#28 Magento\Checkout\Controller\Cart\Index\Interceptor->___callParent()调用于[vendor/Magento/framework/Interception/Interceptorphp:138]#29 Magento\Checkout\Controller\Cart\Index\Interceptor->Magento\Framework\Interception\{closure}()调用于[vendor/Magento/Framework/Interception/Interceptor.php:153]#30 Magento\Checkout\Controller\Cart\Index\Interceptor->___callPlugins()调用于[generated/code/Magento/Checkout/Controller/Cart/Index/Interceptor.php:23]#31 Magento\Checkout\Controller\Cart\Index\Interceptor->execute()调用于[vendor/Magento/framework/App/Action/Action.php:111]#32 Magento\Framework\App\Action\Action->dispatch()调用于[vendor/Magento/Framework/Interception/Interceptor.php:58]#33 Magento\Checkout\Controller\Cart\Index\Interceptor->___callParent()调用于[vendor/Magento/framework/Interception/Interceptorphp:138]#34 Magento\Checkout\Controller\Cart\Index\Interceptor->Magento\Framework\Interception\{closure}()调用于[vendor/Magento/Framework/Interception/Interceptor.php:153]#35 Magento\Checkout\Controller\Cart\Index\Interceptor->___callPlugins()调用于[generated/code/Magento/Checkout/Controller/Cart/Index/Interceptor.php:32]#36 Magento\Checkout\Controller\Cart\Index\Interceptor->dispatch()调用于[vendor/Magento/framework/App/FrontController.php:245]#37 Magento\Framework\App\FrontController->getActionResponse()调用于[vendor/Magento/Framework/App/FrontController.php:212]#38 Magento\Framework\App\FrontController->processRequest()调用于[vendor/Magento/Framework/App/FrontController.php:147]#39 Magento\Framework\App\FrontController->dispatch()调用于[vendor/Magento/Framework/Interception/Interceptor.php:58]#40 Magento\Framework\App\FrontController\Interceptor->___callParent()调用于[vendor/Magento/Framework/Interception/Interceptorphp:138]#41 Magento\Framework\App\FrontController\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/Magento/module store/App/FrontController/Pluin/RequestPreprocessor.php:99]#42 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch()调用于[vendor/Magento/framework/Interception/Interceptor.php:135]#43 Magento\Framework\App\FrontController\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/amassty/aminvisiblecaptcha/Plugin/Framework/App/FrontControllerInterface/ValideCaptcha.php:118]#44 Amasty\InvisibleCaptcha\Plugin\Framework\App\FrontControllerInterface\ValidateCaptcha->aroundDispatch()调用于[vendor/magento/Framework/Interception/Interceptorphp:135]#45 Magento\Framework\App\FrontController\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/Magento/module page cache/Model/App/FrontController/BuiltinPlugin.php:75]#46 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()调用于[vendor/Magento/framework/Interception/Interceptor.php:58]#47 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->___callParent()调用于[vendor/Magento/framework/Interception/Interceptorphp:138]#48 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->Magento\Framework\Interception\{closure}()调用于[vendor/Magento/Framework/Interception/Interceptor.php:153]#49 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->___callPlugins()调用于[generated/code/Magento/PageCache/Model/App/FrontController/BiltinPlugin/Interceptor.php:23]#50 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->aroundDispatch()调用于[vendor/Magento/framework/Interception/Interceptorphp:135]#51 Magento\Framework\App\FrontController\Interceptor->Magento\ Framework\Interception\{closure}()调用于[vendor/Magento/Framework/Interception/Interceptor.php:153]#52 Magento\Framework\App\FrontController\Interceptor->___callPlugins()调用于[generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]#53在[vendor/Magento/Framework/App/Httpphp:116]调用的Magento\Framework\App\FrontController\Interceptor->dispatch()#54在[vendor/Magento/Framework/App/Bootstrap.php:264]调用的Magento\Framework\App\Http->launch()#55在[pub/index.php:30]
我也遇到过完全相同的问题,除了在卸载模块后检索模块外,我不确定在哪里可以找到任何解决方案。然而,今天我决定放弃懒惰,深入搜索问题的根本原因。在数据库中挖掘后,我发现以下表格中有与之相关的数据(调用module:uninstall
命令后未完全清除):
- [表:列]
- admin_user:额外
- authorization_rule:resource_id
- cms_page:内容
- core_config_data:路径
- cron_schedule:job_code
- layout_update:xml
- patch_list:patch_name
解决方案是删除与模块本身完全相关的行,并更新包括模块的行(例如,删除带有模块名称的行,同时注意对象范围/打开和关闭标记)。
select * from [table] where [column] like '%mostviewed%';
我认为这里最重要的记录是cms_page
和layout_update
中的记录,因为它们将与前端页面呈现有关。