我刚刚创建了一个自定义模块,通过使用事件和观察者在Magento站点的类别页面的头部添加一个元标记。当重新加载分类页面时,下面是我看到的错误。我重新运行了升级命令,但错误仍然存在。这样做是为了不索引和不跟踪页面。
1 exception(s):
Exception #0 (MagentoFrameworkExceptionLocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Perfectmakeupmirrors_PmmHead schema: current version - none, required version - 0.0.1
Perfectmakeupmirrors_PmmHead data: current version - none, required version - 0.0.1
Exception #0 (MagentoFrameworkExceptionLocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Perfectmakeupmirrors_PmmHead schema: current version - none, required version - 0.0.1
Perfectmakeupmirrors_PmmHead data: current version - none, required version - 0.0.1
<pre>#1 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:71]
#2 MagentoPageCacheModelAppFrontControllerBuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#3 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/swissup/module-amp/Plugin/Framework/FrontController.php:48]
#4 SwissupAmpPluginFrameworkFrontController->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#5 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 MagentoFrameworkAppFrontControllerInterceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#7 MagentoFrameworkAppFrontControllerInterceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#8 MagentoFrameworkAppHttp->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#9 MagentoFrameworkAppHttpInterceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#10 MagentoFrameworkAppBootstrap->run() called at [pub/index.php:29]
</pre>
假设您有一个数据库备份,请尝试
DELETE FROM setup_module where module = "Perfectmakeupmirrors_PmmHead"
然后运行bin/magento setup:upgrade