0

Magemojo expert gave an error with php file need advice where to start from.

28-Aug-2017 21:59:15 UTC] PHP Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: Invalid Document
Element 'config', attribute 'xsi:noNamespaceSchemaLocation': The attribute 'xsi:noNamespaceSchemaLocation' is not allowed.
Line: 2
in /home/software/public_html/vendor/magento/framework/Config/Reader/Filesystem.php:160
Stack trace:
#0 /home/software/public_html/vendor/magento/framework/Config/Reader/Filesystem.php(127): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#1 /home/software/public_html/vendor/magento/framework/App/ObjectManager/ConfigLoader.php(69): Magento\Framework\Config\Reader\Filesystem->read('global')
#2 /home/software/public_html/vendor/magento/framework/App/ObjectManager/Environment/Developer.php(77): Magento\Framework\App\ObjectManager\ConfigLoader->load('global')
#3 /home/software/public_html/vendor/magento/framework/App/ObjectManagerFactory.php(194): Magento\Framework\App\ObjectManager\Environment\Developer->configureObjectManager(Object(Magento\Framework\Inte in /home/software/public_html/vendor/magento/framework/Config/Reader/Filesystem.php on line 160

Need help ASAP Thanks and sorry if this not a professional post

  • You need to find out which XML file(s) modified the xsi:noNamespaceSchemaLocation section first, then post the codes. – PY Yick Aug 29 '17 at 2:31
  • We also fixed your separate issue regarding the Magento Reviews module not working correctly. It was marked as Enabled in the Advanced Module Output section but this was not true and in the config itself (in the store DB) was marked as disabled. That caused the "Something went wrong" message whenever Product Reviews were opened under a product. Thanks to David Ford, too, who solved both of these (a great tech at MageMojo) – MartyS Aug 30 '17 at 0:00
2

Check all the xml files in your app/code/ directory and ensure they have URN present in the <config> tag such that it has an URN in the tag like this: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/config.xsd">

It cannot be just <config> it has to have an URN present.

| improve this answer | |
  • A little background. This error is caused when attempting to switch the store from production to developer mode. Although the store can function in production mode without the URN present, in developer mode it validates the merged config file against the URN, which causes the error. – David Ford Aug 30 '17 at 11:11
1

Quick side note: this has nothing to do with being hosted with magemojo. See @david ^^^ answer for the real solution.

| improve this answer | |

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.