Am creating some admin manu and I have this error in logs Warning: simplexml_load_string(): Entity: line 32: parser error : Start tag expected, '<' not found in /var/www/vhosts/domaine.com/lib/Varien/Simplexml/Config.php on line 510
and the menu entry doesn't appear either.
config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Sd_Menuadmin>
<version>0.1.0</version>
</Sd_Menuadmin>
</modules>
<global>
<helpers>
<sd_menuadmin>
<class>Sd_Menuadmin_Helper</class>
</sd_menuadmin>
</helpers>
</global>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<sd_menuadmin before="Mage_Adminhtml">Sd_Menuadmin_Adminhtml</sd_menuadmin>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<sd_menu>
<file>sd_menu.xml</file>
</sd_menu>
</updates>
</layout>
</adminhtml>
</config>
adminhtml.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<adminhtml> // <- To fix the bug, do not put this tag
<menu>
<menu1 translate="title" module="sd_menuadmin">
<title>Menu 1</title>
<sort_order>100</sort_order>
<children>
<menuitem1 module="sd_menuadmin">
<title>Submenu 1</title>
<action>adminhtml/menu</action>
</menuitem1>
<menuitem2 module="sd_menuadmin">
<title>Submenu 2</title>
<action>adminhtml/menu/list</action>
</menuitem2>
</children>
</menu1>
</menu>
<acl>
<resources>
<admin>
<children>
<menu1 translate="title" module="sd_menuadmin">
<title>Menu 1</title>
<sort_order>101</sort_order>
<children>
<menuitem1 module="sd_menuadmin">
<title>Submenu 1</title>
</menuitem1>
</children>
<menuitem2 module="sd_menuadmin">
<title>Submenu 2</title>
</menuitem2>
</menu1>
</children>
</admin>
</resources>
</acl>
</adminhtml>
</config>
Sd_Menuadmin.xml
<?xml version="1.0"?>
<config>
<modules>
<Sd_Menuadmin>
<active>true</active>
<codePool>local</codePool>
</Sd_Menuadmin>
</modules>
</config>
MenuController.php in app/code/local/Sd/Menu/controllers/Adminhtml/MenuController.php
<?php
class Sd_Menuadmin_Adminhtml_MenuController extends Mage_Adminhtml_Controller_Action{
public function indexAction()
{
$this->loadLayout()
->_setActiveMenu('mycustomtab')
->_title($this->__('Submenu1')); // for title
// my stuff
$this->renderLayout();
}
public function listAction()
{
$this->loadLayout()
->_setActiveMenu('mycustomtab')
->_title($this->__('Submenu2')); //for title
// my stuff
$this->renderLayout();
}
}
app/etc/modules
folder?