1

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>
sv3n
11.7k7 gold badges44 silver badges75 bronze badges
asked Oct 20, 2017 at 12:29
0

3 Answers 3

2

Replace http://www.w3.org/2001/XMLSchemainstance with http://www.w3.org/2001/XMLSchema-instance.

Notice the extra dash (-) between Schema and instance.

answered Oct 20, 2017 at 12:33
4
  • That didnt do it. I think Commented 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: 2 Commented Oct 20, 2017 at 12:55
  • clear the cache. As I can see, nothing changed. Commented Oct 20, 2017 at 13:01
  • Did that too,, nothing changed same thing. Commented Oct 20, 2017 at 13:05
1

This is incorrect: <resource id="Magento_Adminhtml::admin">

Should be: <resource id="Magento_Backend::admin">

answered May 22, 2018 at 17:20
1

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.

answered Jul 22, 2019 at 8:56

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.