0

I am trying to create a magento plugin I have create every thing required.

when I enabled the plugin then it shows the below error. What I am missing here.

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:

Test_Featureproduct data: current version - none, required version - 2.0.0
\#0 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
\#1 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/Interception/Chain/Chain.php(68): call_user_func_array(Array, Array)
\#2 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'storeCookieVali...')
\#3 /Applications/XAMPP/xamppfiles/htdocs/magento2/app/code/Magento/Store/Model/Plugin/StoreCookie.php(78): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
\#4 [internal function]: Magento\Store\Model\Plugin\StoreCookie->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
\#5 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(141): call_user_func_array(Array, Array)
\#6 /Applications/XAMPP/xamppfiles/htdocs/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
\#7 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
\#8 /Applications/XAMPP/xamppfiles/htdocs/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
\#9 /Applications/XAMPP/xamppfiles/htdocs/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
\#10 {main}

Module.xml enter image description here InstallData.php

enter image description here

  • Does the Test_Featureproduct module have a etc/module.xml file with setup_version? – Maddy Mar 3 '16 at 18:05
  • yes, i have create module.xml with setup_version – Yogendra - eCommerce Developer Mar 3 '16 at 18:08
  • Did you run bin/magento setup:upgrade ? Just enabling the module is not enough, it is not yet installed. once you run this command, you it will be registered with magento – Maddy Mar 3 '16 at 18:10
  • Yes I run below commands bin/magento setup:upgrade ; php bin/magento cache:flush – Yogendra - eCommerce Developer Mar 3 '16 at 18:11
  • after running setup:upgrade, is the module listed in the file app/etc/config.php? Maybe it is a permissions error or some weird failure in upgrading the database – David Verholen Mar 3 '16 at 18:26
1

This happened to me several times. What I do is go to the database, to the table setup_module:

select * from setup_module;

and delete the extension that has the problem. In this case I would go and delete all the: Test_Featureproduct line. Once done, run these commands:

php bin/magento setup:upgrade;
php bin/magento cache:flush;

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.