Nipun Tyagi
Nipun Tyagi

Reputation: 898

How to fix "DOM UNABLE TO LOAD" error of vqmod in opencart

I want to add a new submenu under the catalog in the admin of the opencart using Vqmod. Here is my code:

<modification>
<id>add menu</id>
<author>XXX</author>
<version>2.3</version>
<vqmver>1.0.8</vqmver>
    <!-- OPTION CONTROLLER -->  
    <file name="admin/controller/common/header.php">
        <operation>
            <search position="after"><![CDATA[
            $this->data['text_newmenu'] = $this->language->get('text_newmenu');
            ]]></search>
            <add><![CDATA[
            $this->data['text_newmenu'] = $this->language->get('text_newmenu');
            ]]></add>
        </operation>
        <operation>
            <search position="after"><![CDATA[
            $this->data['doctor'] = $this->url->link('catalog/doctor', 'token=' . $this->session->data['token'], 'SSL');
            ]]></search>
            <add><![CDATA[
            $this->data['newmenu'] = $this->url->link('catalog/newmenu', 'token=' . $this->session->data['token'], 'SSL');
            ]]></add>
        </operation>
    </file>
    <!-- OPTION LANGUAGE -->
    <file name="admin/language/english/common/header.php">
        <operation>
            <search position="after"><![CDATA[
            $_['text_zone']  = 'Zones';
            ]]></search>
            <add><![CDATA[
            $_['entry_newmenu']  = 'Wow sexy';
            ]]></add>
        </operation>
    </file> 
    <!-- header.tpl for new menu-->
    <file name="admin/view/template/common/header.tpl">
        <operation>
            <search position="after"><![CDATA[
            <li><a href="<?php echo $doctor; ?>"><?php echo $text_doctor; ?></a></li>
            ]]></search>
            <add><![CDATA[
            <li><a href="<?php echo $newmenu; ?>"><?php echo $text_newmenu; ?></a></li>
            ]]></add>
        </operation>
    </file>
<modification>

But there is an error comes in DOM UNABLE TO LOAD: /opt/lampp/htdocs/work/oc/vqmod/xml/addmenu.xml Does any one know whats the problem in my code?

Upvotes: 1

Views: 3361

Answers (3)

Pavan Mehta
Pavan Mehta

Reputation: 314

I Was facing the similar problem. I had given the permission to the file. But still it was saying unable to load. After little research i found that it had admin permission and no read permission from others, which can be given by :

sudo chmod a+r filename

if you want to give to entire directory, then

sudo chmod -R a+r directory/

and this fixed my bug..

Hope it helps

Upvotes: 2

Jay Gilford
Jay Gilford

Reputation: 15151

Do you have any non-standard characters in your author tag such as á é í ó ú? If so, make sure you put them in CDATA tags as well as putting the

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

header at the very start of the document (with absolutely nothing before it)

Upvotes: 0

Akhil Thayyil
Akhil Thayyil

Reputation: 9403

addmenu.xml please validate this xml using an xml validator like this

http://www.xmlvalidation.com/

The error is because xml file is not a valid one

If this doesn't solve the problem , then try adding

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

at top of the xml

Upvotes: 1

Related Questions