2

I'm managing a Magento installation for a client and I have installed one for development on the same server as well. There are a couple of custom modules in both installations. (They extend the BE as well as the FE.)

Now I have this weird situation that two menu items have disappeared from the Catalog menu in the admin panel, but only in the live installation. The menu items have been defined in the config.xml of a custom module. However, if I copy/paste the URL of the admin module (e.g. index.php/managemanufacturer/adminhtml_managemanufacturerbackend/) it still works, in both installations! So, the module is properly installed. Only the menu items are gone. How is this possible?

EDIT: Here is one of the config.xml files in question.

<?xml version="1.0"?>
<config>
  <modules>
    <Siwa_Mshipcalc>
      <version>0.1.0</version>
    </Siwa_Mshipcalc>
  </modules>
  <global>
    <models>
      <mshipcalc>
        <class>Siwa_Mshipcalc_Model</class>
      </mshipcalc>
    </models>
    <helpers>
      <mshipcalc>
        <class>Siwa_Mshipcalc_Helper</class>
      </mshipcalc>
    </helpers>
    <blocks>
      <mshipcalc>
        <class>Siwa_Mshipcalc_Block</class>
      </mshipcalc>
    </blocks>
    <resources>
      <mshipcalc_setup>
        <setup>
          <module>Siwa_Mshipcalc</module>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </mshipcalc_setup>
      <mshipcalc_write>
        <connection>
          <use>core_write</use>
        </connection>
      </mshipcalc_write>
      <mshipcalc_read>
        <connection>
          <use>core_read</use>
        </connection>
      </mshipcalc_read>
    </resources>
  </global>
  <admin>
    <routers>
      <mshipcalc>
        <use>admin</use>
        <args>
          <module>Siwa_Mshipcalc</module>
          <frontName>mshipcalc</frontName>
        </args>
      </mshipcalc>
    </routers>
  </admin>
  <adminhtml>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <mshipcalc translate="title" module="mshipcalc">
              <title>Mshipcalc</title>
              <sort_order>1000</sort_order>
              <children>
                <mshipcalcbackend translate="title">
                  <title>Siwa Manufacturer Ship Calc</title>
                </mshipcalcbackend>
              </children>
            </mshipcalc>
          </children>
        </admin>
      </resources>
    </acl>
    <layout>
      <updates>
        <mshipcalc>
          <file>mshipcalc.xml</file>
        </mshipcalc>
      </updates>
    </layout>
    <menu>
      <catalog>
        <children>
          <mshipcalcbackend module="mshipcalc">
            <title>Manufacturer Ship Calc</title>
            <sort_order>1</sort_order>
            <action>mshipcalc/adminhtml_mshipcalcbackend</action>
          </mshipcalcbackend>
        </children>
      </catalog>
    </menu>
  </adminhtml>    
  <default>
    <carriers>
      <mshipcalc>
        <active>1</active>
        <model>Siwa_Mshipcalc_Model_Carrier_Mshipcalc</model>
        <name>mshipcalc</name>
        <title>MShipCalc</title>
        <description>Siwa Manufacturer Ship Calc</description>
        <sort_order>0</sort_order>
        <type>I</type>
        <handling_type>F</handling_type>
        <sallowspecific>0</sallowspecific>
      </mshipcalc>
    </carriers>
  </default>
</config>

Doesn't look wrong to me...

  • 1
    Clear the cache – Marius Dec 14 '13 at 16:53
  • I did. Configuration cache, Magento cache and the cache storage. Am I missing something? – vbwx Dec 14 '13 at 22:28
  • 1
    check your config.xml file in your module folder and check the <menu> tag. if not find in config.xml file then check in adminhtml.xml file. there is some tag issue – Keyul Shah Dec 15 '13 at 8:16
  • I don't think anything is wrong with the XML, because otherwise the menu items wouldn't show up in the development installation. – vbwx Dec 17 '13 at 8:47
  • there is problem in acl resources tab. – Keyul Shah Dec 17 '13 at 9:07
2

This is my guess what has most likely happened - somebody has modified the role permissions (most likely something unrelated to the module).

When you add a new path into the ACL node tree, by default people will be able to perform that action, despite the fact if you go to the Role management you will see that the field isn't checked. As soon as somebody saves the ACL for that role though, the ACL table will be updated and the person will no longer have permissions to perform the action.

If this is the case, simply going to System > Permissions > Roles ticking the box and saving should resolve the issue. NB: All users will have to log out and back in to update the ACL since the information is stored in your session when you first sign in.

|improve this answer|||||
  • Yes, that was the problem. In fact, I didn't even see the System > Permissions menu anymore (as admin) because someone has messed around in the database. Thanks for the elaborate answer! – vbwx Dec 18 '13 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.