3

In magento 2 i am enable developer mode, all things are working good but today

Its give me this error

Warning: DOMDocument::schemaValidate(): Invalid Schema in\magento\framework\Config\Dom.php on line 290

When i am disable developer mode its working properly, i don't understand why this error generate suddenly

i want to enable developer mode,is there any solution?

2
  • When you are on developer mode.You need to use -f with your command. Like this: php bin/magento setup:static-content:deploy -f. Apr 8, 2020 at 7:00
  • I am facing same issue. and issue happen some time in production mode and after some time it's fixed automatically. what's wrong with apache sometime? Dec 17, 2021 at 5:19

3 Answers 3

7

I had the same problem in developer mode. Following steps solved my problems:

  1. change your application mode to "production"

    Command:

    php bin/magento deploy:mode:set production --skip-compilation
    
  2. run the command to deploy static view contents

    Command:

    php bin/magento setup:static-content:deploy
    
  3. Change your application mode back to "developer"

Those steps should solve the problem as it works absolutely fine for me.

1
  • As soon as developer mode is enabled, it goes back to the same error. Apr 29, 2020 at 3:43
3

Below solution worked for me.

Restart Apache Server. After this run below command :

php bin/magento setup:static-content:deploy

1
  • why need to "Restart Apache Server." ?? what's wrong with apache some time?? Dec 17, 2021 at 5:17
2

Restart Your Apache Server & After this run below command :

php bin/magento setup:static-content:deploy -f

6
  • why need to "Restart Apache Server." ?? what's wrong with apache some time?? Dec 17, 2021 at 5:17
  • This is actual issue in server cache. So, When you restart apache2 Server cache would be clean. As well as Nginx server too. Dec 17, 2021 at 6:35
  • thanx for response. but I want to know reason of issue. why apache server show issue? I want to fix it permanent bases. our site showing it once in week. Dec 17, 2021 at 6:37
  • For Permanent solution you have to turn on Magento Production Mode. It would help you on both way: 1. Error not shown on frontend it would be write in the logs. 2. Site Speed will be up more than 30% from development mode. Also, Development mode is use for development to show error on runtime. Dec 17, 2021 at 6:42
  • Production mode already set and that's why it's not showing error but showing "An error has happened during application run. See exception log for details. Could not write error message to log. Please use developer mode to see the message." but it's not wrinting anything in log. so I changed site to developer mode and find this Dom.php related error. now I want to fix it permanent basis Dec 17, 2021 at 7:08

Your Answer

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

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