Hello,
My Magento has been update from 2.3.0 to 2.3.1.
When I go to the shop as you can see here:
https://www.mybeauty-store.ch/
I have an exception telling me:
Please upgrade your database: Run "bin/magento setup:upgrade"
I have connected by SSH and run the command bin/magento setup:upgrade.
But the same exception is still displaying.
Could you help me with that?
Thanks in advance
Solved! Go to Solution.
Hello @melghazi
I understand the issue you are facing, this is known issue.
I would say you will require to run - composer update command.
If its still not solved then you will require to do below manual process.
The error you are facing because few modules are outdated as you have updated the magento version you will require to update your module version as well based on the version number that showing on the browser.
So from the database run below query : this will update your amazon_core module's version from the database.
UPDATE `your_table_prfix_setup_module` SET schema_version="3.1.4", data_version="3.1.4" WHERE module="Amazon_Core";
Same way you will require to run this query for all the modules which is showing on the browser.
Another option would be add those module with version in your composer.json - require file that will help you for the same.
So refer this link for more details - https://community.magento.com/t5/Magento-2-x-Technical-Issues/The-following-modules-are-outdated-nMa...
Hope it helps!
Hello @melghazi
I understand the issue you are facing, this is known issue.
I would say you will require to run - composer update command.
If its still not solved then you will require to do below manual process.
The error you are facing because few modules are outdated as you have updated the magento version you will require to update your module version as well based on the version number that showing on the browser.
So from the database run below query : this will update your amazon_core module's version from the database.
UPDATE `your_table_prfix_setup_module` SET schema_version="3.1.4", data_version="3.1.4" WHERE module="Amazon_Core";
Same way you will require to run this query for all the modules which is showing on the browser.
Another option would be add those module with version in your composer.json - require file that will help you for the same.
So refer this link for more details - https://community.magento.com/t5/Magento-2-x-Technical-Issues/The-following-modules-are-outdated-nMa...
Hope it helps!
Hello Dave,
Thank you for your quick reply.
When you say that these modules are outdated, does it mean that there is also an update for them? If yes, is it normal that there were not updated at the same time with Magento? Or is it maybe that there were updated but only the entry in the setup_module was not updated? If it's the case do you know if it is a normal behaviour?
It's confusing for me because you propose to update the setup_module table with the version displayed in the exception. If I do it this way I understand that it will fix the problem but there will be no others changes in the module (files or tables structure...).
Will it be different if I run the composer update command? Or is it the same result, meaning that it will just update the table setup_module?
Thanks for your help
Hello @melghazi
That's correct , and that's the reason i suggest you alternate options which is composer update.
As mentioned in the above thread - add the module name with the updated version (Shown in the browser) in your composer.json file under the require section.
then run the composer update command !
It will update your module files, structure along with the database data and schema version as well.
So you won't face any issue !
This is the safest and secure way to upgrade the same.
Hope you got it.
Hello Dave,
Thank you for the clarification.
Can I ask you if you can help me in editing the composer file the right way?
For example with line:
Amazon_Core schema: current version - 3.0.0, required version - 3.1.4
Should I edit the composer.json file in the magento directory?
What do I need to add and where?
Thank you for your time.
Hi @melghazi
First have you tried to run composer update command ?
First run only that, once its done then run php bin/magento setup:upgrade command.
If error is still there then you will require to edit the composer.json file.
because mostly composer update will download the update version of the module so may be directly your issue gets resolved,
So that's the reason i have posted all 3 approaches, first run composer update.
Hope it helps !
Hi Dave,
I have run the composer update command and had this result:
Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 0 installs, 27 updates, 0 removals - Updating colinmollenhour/php-redis-session-abstract (v1.4.0 => v1.4.1): Downloading (100%) - Updating paragonie/sodium_compat (v1.9.0 => v1.9.1): Downloading (100%) - Updating composer/semver (1.4.2 => 1.5.0): Downloading (100%) - Updating doctrine/annotations (v1.6.0 => v1.6.1): Downloading (100%) - Updating symfony/options-resolver (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/polyfill-php70 (v1.10.0 => v1.11.0): Downloading (100%) - Updating symfony/polyfill-php72 (v1.10.0 => v1.11.0): Downloading (100%) - Updating symfony/stopwatch (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/polyfill-ctype (v1.10.0 => v1.11.0): Downloading (100%) - Updating symfony/filesystem (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/polyfill-mbstring (v1.10.0 => v1.11.0): Downloading (100%) - Updating symfony/finder (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/yaml (v3.4.23 => v3.4.24): Downloading (100%) - Updating consolidation/robo (1.4.6 => 1.4.9): Downloading (100%) - Updating composer/spdx-licenses (1.5.0 => 1.5.1): Downloading (100%) - Updating symfony/css-selector (v4.2.4 => v4.2.5): Downloading (100%) - Updating doctrine/instantiator (1.1.0 => 1.2.0): Downloading (100%) - Updating doctrine/collections (v1.5.0 => v1.6.1): Downloading (100%) - Updating symfony/dom-crawler (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/browser-kit (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/config (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/dependency-injection (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/inflector (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/property-access (v4.2.4 => v4.2.5): Downloading (100%) - Updating symfony/polyfill-util (v1.10.0 => v1.11.0): Downloading (100%) - Updating symfony/polyfill-php56 (v1.10.0 => v1.11.0): Downloading (100%) - Updating symfony/http-foundation (v4.2.4 => v4.2.5): Downloading (100%) Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested. Writing lock file Generating autoload files
After that I ran bin/magento setup:ugrade but the error is still there.
The second approach would be to edit the composer.json file if I follow you correctly. Is that right?
The file is located in the main magento folder. Could you guide me on how to edit it correctly?
Thank you in advance.
Hello @melghazi
Yes that's the correct file - in the magento root folder you will see composer.json file that you will require to update.
Regarding how to update, i would say in the require section you need to add your module version details.
Below is the example code :
"require": { "magento/product-community-edition": "2.3.1", "composer/composer": "@alpha", "amzn/amazon-pay-and-login-with-amazon-core-module": "3.1.4", "amzn/amazon-pay-module": "3.1.4", "amzn/login-with-amazon-module": "3.1.4" },
Same way you will need to add all the modules which is currently showing on the browser as an error with the required version they have mentioned.
Once that addition in composer.json file is done - then run composer update command again
It will download the latest modules and then once process gets finished run php bin/magento setup:upgrade command.
It will resolved your issue !
Hello Dave,
I have followed your instructions and edited the composer.json file with the example code you gave me.
The error is still there but if I open for example vendor/amzn/amazon-pay-and-login-with-amazon-core-module/etc/module.xml I have the following:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Amazon_Core" setup_version="3.1.4"> <sequence> <module name="Magento_Store"/> <module name="Magento_Customer"/> <module name="Magento_Payment"/> <module name="Magento_Checkout"/> <module name="Magento_Catalog"/> <module name="Magento_Quote"/> </sequence> </module> </config>
I see that setup_version is 3.1.4.
Does it mean that the module was correctly updated?
Or is that not enough verification?
I guess that if you tell me that it was updated successfully, I need to update the database with the query:
UPDATE `your_table_prfix_setup_module` SET schema_version="3.1.4", data_version="3.1.4" WHERE module="Amazon_Core";
Is there anything else to do?
Thank you!
Hello @melghazi
Yes that means now you have latest version of all the modules !
After this have you run the php bin/magento setup:upgrade command ?
Kindly run that command and do php bin/magento setup:di:compile and cache clean and cache flush then check !
If still not solved then we go with the database query approach !