0

I just tried creating a basic module like in this tutorial.

But when I try to request the controller, I get the error:

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:
Magestore_HelloMagento data: current version - none, required version - 1.0.0

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:
Magestore_HelloMagento data: current version - none, required version - 1.0.0
#0 C:\wamp64\www\magento2\vendor\magento\framework\Interception\Chain\Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#1 C:\wamp64\www\magento2\vendor\magento\framework\Interception\Chain\Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#2 C:\wamp64\www\magento2\vendor\magento\module-page-cache\Model\App\FrontController\BuiltinPlugin.php(73): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#3 C:\wamp64\www\magento2\vendor\magento\framework\Interception\Chain\Chain.php(67): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#4 C:\wamp64\www\magento2\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#5 C:\wamp64\www\magento2\vendor\magento\module-page-cache\Model\App\FrontController\VarnishPlugin.php(55): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#6 C:\wamp64\www\magento2\vendor\magento\framework\Interception\Interceptor.php(142): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#7 C:\wamp64\www\magento2\var\generation\Magento\Framework\App\FrontController\Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#8 C:\wamp64\www\magento2\vendor\magento\framework\App\Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#9 C:\wamp64\www\magento2\vendor\magento\framework\App\Bootstrap.php(258): Magento\Framework\App\Http->launch()
#10 C:\wamp64\www\magento2\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#11 {main}

I tried executing php bin/magento setup:upgrade, it was successful, but the error is still there.

1
  • are you create registration.php file?? Commented Jun 13, 2017 at 12:11

2 Answers 2

4

Go to setup_module Table

Find your module Magestore_HelloMagento.

Make sure schema_version & data_version should be same as per your current module.

Then run

php bin/magento setup:upgrade

It will work

3
  • Magestore_HelloMagento data: current version - none that is the problem for this issue Commented Jun 13, 2017 at 12:14
  • Do you know if there is any way to programmatically fix this issue without requiring the database access? Commented Jun 19, 2017 at 18:41
  • i will check and tell you. is it possible. Commented Jun 20, 2017 at 10:58
1

You need to delete the Magestore_HelloMagento from setup_module table name in database. Then run the command bin/magento setup:upgrade

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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