Hello I've this custom module for Magento when loggin in to Magento Admin I am getting this error
Error Message I am getting
1 exception(s): Exception #0 (LogicException): Could not create an acl object: Invalid XML in file /home/web/public_html/app/code/Pmage/Matrixprice/etc/acl.xml: Element 'config', attribute '{http://www.w3.org/2001/XMLSchemainstance}noNamespaceSchemaLocation': The attribute '{http://www.w3.org/2001/XMLSchemainstance}noNamespaceSchemaLocation' is not allowed. Line: 2
Exception #0 (LogicException): Could not create an acl object: Invalid XML in file /home/web/public_html/app/code/Pmage/Matrixprice/etc/acl.xml: Element 'config', attribute '{http://www.w3.org/2001/XMLSchemainstance}noNamespaceSchemaLocation': The attribute '{http://www.w3.org/2001/XMLSchemainstance}noNamespaceSchemaLocation' is not allowed. Line: 2
The Code is as follows
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Adminhtml::admin">
<!--AddMenuAcl-->
<resource id="Pmage_Unit::unit" title="Pmage">
<resource id="Pmage_Matrixprice::manage_matrix" title="Manage Matrix" />
</resource>
</resource>
</resources>
</acl>
</config>
3 Answers 3
Replace http://www.w3.org/2001/XMLSchemainstance with http://www.w3.org/2001/XMLSchema-instance.
Notice the extra dash (-) between Schema and instance.
-
That didnt do it. I thinkSohaib Khan– Sohaib Khan2017年10月20日 12:55:11 +00:00Commented Oct 20, 2017 at 12:55
-
1 exception(s): Exception #0 (LogicException): Could not create an acl object: Invalid XML in file /home/web/public_html/app/code/Pmage/Unit/etc/acl.xml: Element 'config', attribute '{w3.org/2001/XMLSchemainstance}noNamespaceSchemaLocation': The attribute '{w3.org/2001/XMLSchemainstance}noNamespaceSchemaLocation' is not allowed. Line: 2Sohaib Khan– Sohaib Khan2017年10月20日 12:55:42 +00:00Commented Oct 20, 2017 at 12:55
-
clear the cache. As I can see, nothing changed.Marius– Marius2017年10月20日 13:01:10 +00:00Commented Oct 20, 2017 at 13:01
-
Did that too,, nothing changed same thing.Sohaib Khan– Sohaib Khan2017年10月20日 13:05:00 +00:00Commented Oct 20, 2017 at 13:05
This is incorrect: <resource id="Magento_Adminhtml::admin">
Should be: <resource id="Magento_Backend::admin">
Change this line, your module name is incorrect.
<resource id="Pmage_Unit::unit" title="Pmage">
Update code
<resource id="Pmage_Matrixprice::unit" title="Pmage">
Hope it helps.