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>
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.

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.
    – Marius
    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">

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.

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.