0

I just created a custom module to add a metatag in a category page of our Magento site by making use of event and observer. When reloading the category page, below is the error I see. I re-ran the upgrade command but the error persists.

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): 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 (Magento\Framework\Exception\LocalizedException): 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 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:71]
#2 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#3 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/swissup/module-amp/Plugin/Framework/FrontController.php:48]
#4 Swissup\Amp\Plugin\Framework\FrontController->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#5 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#7 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#8 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#9 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#10 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:29]
</pre>
5
  • check in your database with below query SELECT * FROM setup_module where module = "Perfectmakeupmirrors_PmmHead"
    – S.P
    May 16 at 6:57
  • delete it and execute setup:upgrade command.
    – S.P
    May 16 at 6:57
  • You mean delete that record from the table? May 16 at 7:26
  • yes, forbackup rename records and execute setup:upgrade command
    – S.P
    May 16 at 7:41
  • S.P, thanks a lot. It got fixed. Final thing is the code you wrote to set noindex nofollow. I created a new post here stackoverflow.com/questions/72258894/… . $this->request->getActionName() is returning "View" when I open that category page. May 16 at 12:21

1 Answer 1

1

Keep your database backup before do it.

delete your module entry from setup_module table. Ex.

SELECT * FROM setup_module where module = "Perfectmakeupmirrors_PmmHead";
delete  FROM setup_module where module = "Perfectmakeupmirrors_PmmHead";

and execute php bin/magento setup:upgrade

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.