0

I have a problem about my custom module. It is not shown in my admin panel menu and when I try to open it with its url, I see a 404 page.

My module config file:

<?xml version="1.0"?>
<config>
  <modules>
    <Altar_Hashtag>
      <version>0.1.0</version>
    </Altar_Hashtag>
  </modules>
  <global>
      <page>
          <layouts>
              <page>
                  <label>Share Contents</label>
                  <template>page/sharecontents.phtml</template>
              </page>
          </layouts>
      </page>
    <helpers>
      <hashtag>
        <class>Altar_Hashtag_Helper</class>
      </hashtag>
    </helpers>
    <blocks>
      <hashtag>
        <class>Altar_Hashtag_Block</class>
      </hashtag>
    </blocks>
    <models>
      <hashtag>
        <class>Altar_Hashtag_Model</class>
        <resourceModel>hashtag_mysql4</resourceModel>
      </hashtag>
      <hashtag_mysql4>
        <class>Altar_Hashtag_Model_Mysql4</class>
        <entities>
              <hashtag>
                <table>altar_hashtag_contents</table>
              </hashtag>
        </entities>
      </hashtag_mysql4>
    </models>
    <resources>
      <hashtag_setup>
        <setup>
          <module>Altar_Hashtag</module>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </hashtag_setup>
      <hashtag_write>
        <connection>
          <use>core_write</use>
        </connection>
      </hashtag_write>
      <hashtag_read>
        <connection>
          <use>core_read</use>
        </connection>
      </hashtag_read>
    </resources>
  </global>
  <admin>
    <routers>
      <hashtag>
        <use>admin</use>
        <args>
          <module>Altar_Hashtag</module>
          <frontName>hashtag</frontName>
        </args>
      </hashtag>
    </routers>
  </admin>
  <adminhtml>
  <menu>
    <hashtag module="hashtag">
    <title>Hashtag</title>
    <sort_order>100</sort_order>
    <children>
      <hashtag module="hashtag">
        <title>Manage Hashtag</title>
        <sort_order>0</sort_order>
        <action>hashtag/adminhtml_hashtag</action>
      </hashtag>
    </children>
    </hashtag>
  </menu>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <hashtag translate="title" module="hashtag">
              <title>Hashtag</title>
              <sort_order>1000</sort_order>
              <children>
          <hashtag translate="title">
            <title>Manage Hashtag</title>
            <sort_order>0</sort_order>
          </hashtag>
              </children>
            </hashtag>
          </children>
        </admin>
      </resources>
    </acl>
    <layout>
      <updates>
        <hashtag>
          <file>hashtag.xml</file>
        </hashtag>
      </updates>
    </layout>
  </adminhtml>
</config>

1 Answer 1

1

The <acl> and <menu> elements do not belong inside <adminhtml>, they have to be direct children of <config>.

Also although it works in config.xml for backward compatibility reasons, you should move these to a separate file adminhtml.xml to follow Magento conventions.

1
  • Thank you for help but still problem
    – Cengiz
    Commented May 26, 2016 at 12:37

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.