0

I am getting this error: Element 'item': This element is not expected. Expected is ( argument ) when run command like: php bin/magento cache:flush. I try to get back production mode but still get the same error.

Here log file:

magento.cron.log

Invalid Document 
Element 'item': This element is not expected. Expected is ( argument ).
Line: 197
Element 'item': This element is not expected. Expected is ( argument ).
Line: 205
Element 'item': This element is not expected. Expected is ( argument ).
Line: 213
Element 'item': This element is not expected. Expected is ( argument ).
Line: 225
...........

exception.log

[2023年11月06日 01:19:03] main.CRITICAL: Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
MagTabe_BaseConfig schema: current version - none, required version - 0.0.2
MagTabe_BaseConfig data: current version - none, required version - 0.0.2 {"report_id":"9226b8a76cca6e9b24733f4116677dce1a095c9b50198110eaec307fac6d7b3b","exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): Please upgrade your database: Run \"bin/magento setup:upgrade\" from the Magento root directory.
The following modules are outdated:
MagTabe_BaseConfig schema: current version - none, required version - 0.0.2
MagTabe_BaseConfig data: current version - none, required version - 0.0.2 at /opt/my_website/vendor/magento/framework/Module/Plugin/DbStatusValidator.php:66)"} []
asked Nov 6, 2023 at 3:28
4
  • As per exception log, you need to run php bin/magento setup:upgrade cmd Commented Nov 6, 2023 at 4:00
  • @Pawan php bin/magento setup:upgrade not working, i still get error "Element 'item': This element is not expected. Expected is ( argument )" Commented Nov 6, 2023 at 4:02
  • are you using any custom theme/module ? change theme to luma and try Commented Nov 6, 2023 at 4:05
  • i use some custom module third party. right now, i'm in dev mode & cannot access to admin home page. Commented Nov 6, 2023 at 4:13

1 Answer 1

0

(solution 1)

So please login phpmyadmin. select your database and find the table name ="setup_module" Remove MagTabe_BaseConfig so you get an error. after apply upgrade and deploy commands.

 php bin/magento s:up && php bin/magento setup:di:compile && php bin/magento s:static-content:de -f && php bin/magento c:f 

(Solution 2)

You can also apply the below query.

DELETE FROM setup_module where module = "MagTabe_BaseConfig";

After applying the below commands

 php bin/magento s:up && php bin/magento setup:di:compile && php bin/magento s:static-content:de -f && php bin/magento c:f 
answered Nov 10, 2023 at 5:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.