Question

After i changed my site to developer mode, i got this error while trying to access backend module:

1 exception(s): Exception #0 (Magento\Framework\Config\Dom\ValidationException): Theme layout update file '/var/www/project/app/code/Namespace/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml' is not valid. Premature end of data in tag page line 3 Line: 7

/var/www/project/app/code/Namespace/Module/view/adminhtml/layout/adminhtml_system_config_edit.xml

<?xml version="1.0" encoding="UTF-8"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head>
    <css src="jquery/colorpicker/css/colorpicker.css"/>
</head>
Était-ce utile?

La solution

I think missing page tag close

<?xml version="1.0" encoding="UTF-8"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<head>
    <css src="jquery/colorpicker/css/colorpicker.css"/>
</head>
</page>

Autres conseils

Use the below code for your layout file:

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="jquery/colorpicker/css/colorpicker.css"/>
    </head>
</page>
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange
scroll top