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)"} []
4
  • As per exception log, you need to run php bin/magento setup:upgrade cmd
    – Pawan
    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 )"
    – it's me
    Nov 6, 2023 at 4:02
  • are you using any custom theme/module ? change theme to luma and try
    – Pawan
    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.
    – it's me
    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 

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.