Magento admin menu link stopped working after upgrade - magento

Before upgradation to EE v1.12.0.2, we were running v1.10.1.1, at which point this code works fine to add an external link to the menu.
<?xml version="1.0"?>
<config>
<modules>
<Clean_Integration>
<version>1.0.0</version>
</Clean_Integration>
</modules>
<global>
<models>
<customer>
<rewrite>
<customer_api>Clean_Integration_Model_Customer_Customer_Api</customer_api>
</rewrite>
</customer>
</models>
<helpers>
<coaching>
<class>Clean_Integration_Helper</class>
</coaching>
</helpers>
</global>
<frontend>
<layout>
<updates>
<Clean_Integration module="Clean_Integration">
<file>cleanintegration.xml</file>
</Clean_Integration>
</updates>
</layout>
</frontend>
<adminhtml>
<menu>
<coaching translate="title" module="Integration">
<title>Coaching</title>
<sort_order>71</sort_order>
<url>/appointments/sync/backend/</url>
</coaching>
</menu>
<acl>
<resources>
<admin>
<children>
<coaching translate="title">
<title>Coaching</title>
</coaching>
</children>
</admin>
</resources>
</acl>
</adminhtml>
</config>
We had a link like domain.com/appointments/sync/backend/ with this but now with upgrade the menu entry appears but its not a link anymore. So, I am guessing something was changed in Magento which breaks this, any ideas?

<?xml version="1.0"?>
<config>
<modules>
<Clean_Integration>
<version>1.0.0</version>
</Clean_Integration>
</modules>
<global>
<models>
<customer>
<rewrite>
<customer_api>Clean_Integration_Model_Customer_Customer_Api</customer_api>
</rewrite>
</customer>
</models>
<helpers>
<integration>
<class>Clean_Integration_Helper</class>
</integration>
</helpers>
</global>
<frontend>
<layout>
<updates>
<integration>
<file>cleanintegration.xml</file>
</integration>
</updates>
</layout>
</frontend>
<adminhtml>
<menu>
<integration translate="title" module="integration">
<title>Coaching</title>
<sort_order>71</sort_order>
<action>appointments/sync/backend/</action>
</integration>
</menu>
<acl>
<resources>
<admin>
<children>
<integration translate="title">
<title>Coaching</title>
</integration>
</children>
</admin>
</resources>
</acl>
</adminhtml>
</config>
Create in /app/code/local/Clean/Integration/Helper/Data.php
<?php
class Clean_Integration_Helper_Data extends Mage_Core_Helper_Abstract
{
}
Take a look # Create a sample admin module for form processing

Related

Magento 1.9 add layout and template to custom module in admin

I try to create custom module that shows on main page two tabs with option to change titles, backgrounds, colors.
I successfully add the module tab in admin and can't add layout and template.
I'm stuck.
Can any one explain, please, how I can do this?
Here are the xml files that I got:
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Lern_Sample>
<version>0.1.0</version>
</Lern_Sample>
</modules>
<frontend>
<routers>
<sample>
<use>standard</use>
<args>
<module>Lern_Sample</module>
<frontName>sample</frontName>
</args>
</sample>
</routers>
</frontend>
<admin>
<routers>
<sample>
<use>admin</use>
<args>
<module>Lern_Sample</module>
<frontName>admin_sample</frontName>
</args>
</sample>
</routers>
</admin>
<global>
<helpers>
<sample>
<class>Lern_Sample_Helper</class>
</sample>
</helpers>
</global>
<adminhtml>
<menu>
<sample module="sample">
<title>Sample Module</title>
<sort_order>100</sort_order>
<children>
<sample module="sample">
<title>Sample Module</title>
<sort_order>0</sort_order>
<action>admin_sample/adminhtml_index</action>
<layout>
<lern_sample>
<file>lern_sample.xml</file>
</lern_sample>
</layout>
</sample>
</children>
</sample>
</menu>
</adminhtml>
module xml etc/Lern_Sample.xml
<?xml version="1.0"?>
<config>
<modules>
<Lern_Sample>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Adminhtml />
</depends>
</Lern_Sample>
</modules>
You can add your own layout file by declaring it under the node <frontend>, just like this :
<layout>
<updates>
<sample>
<file>sample.xml</file>
</sample>
</updates>
</layout>
Your layout file will have to be located under app/design/frontend/MY_CUSTOM_PACKAGE/MY_DEFAULT_THEME/layout/sample.xml or under the base installation app/design/frontend/base/default/layout/sample.xml
If you try to add a layout update file for the admin, just use this code sample under the node <adminhtml>.

getting 404 page not found error when redirecting in admin

I had installed a custom extension on both live and local server. It is running fine on local server but gives issues i.e. redirects to frontend and gives 404 page not found error when I click on custom extension page in admin.
Below is my config.xml and extension.xml file code:
config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Submitdigital_CustomLogo>
<version>0.1.0</version> <!-- Version number of your module -->
</Submitdigital_CustomLogo>
</modules>
<global>
<helpers>
<customlogo>
<class>Submitdigital_CustomLogo_Helper</class>
</customlogo>
</helpers>
<blocks>
<customlogo>
<class>Submitdigital_CustomLogo_Block</class>
</customlogo>
</blocks>
<models>
<customlogo>
<class>Submitdigital_CustomLogo_Model</class>
<resourceModel>customlogo_mysql4</resourceModel>
</customlogo>
<customlogo_mysql4>
<class>Submitdigital_CustomLogo_Model_Mysql4</class>
<entities>
<customlogo>
<table>customlogo</table>
</customlogo>
</entities>
</customlogo_mysql4>
</models>
<resources>
<customlogo_setup>
<setup>
<module>Submitdigital_CustomLogo</module>
<class>Mage_Eav_Model_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</customlogo_setup>
<customlogo_write>
<connection>
<use>core_write</use>
</connection>
</customlogo_write>
<customlogo_read>
<connection>
<use>core_read</use>
</connection>
</customlogo_read>
</resources>
</global>
<admin>
<routers>
<admin_customlogo>
<use>admin</use>
<args>
<module>Submitdigital_CustomLogo</module>
<frontName>admin_customlogo</frontName>
</args>
</admin_customlogo>
</routers>
</admin>
<adminhtml>
<menu>
<customlogo>
<title>SubmitDigital</title>
<sort_order>100</sort_order>
<children>
<customlogo>
<title>Manage Customlogo</title>
<sort_order>0</sort_order>
<action>customlogo/adminhtml_customlogo</action>
</customlogo>
</children>
</customlogo>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<customlogo translate="title">
<title>SubmitDigital</title>
<sort_order>1000</sort_order>
<children>
<customlogo translate="title">
<title>Manage Customlogo</title>
<sort_order>0</sort_order>
</customlogo>
</children>
</customlogo>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<customlogo>
<file>customlogo.xml</file>
</customlogo>
</updates>
</layout>
</adminhtml>
<frontend>
<routers>
<customlogo>
<use>standard</use>
<args>
<module>Submitdigital_CustomLogo</module>
<frontName>customlogo</frontName>
</args>
</customlogo>
</routers>
<layout>
<updates>
<customlogo>
<file>customlogo.xml</file>
</customlogo>
</updates>
</layout>
</frontend>
</config>
extension.xml(customlogo.xml):
<?xml version="1.0"?>
<layout version="0.1.0">
<customlogo_adminhtml_customlogo_index>
<reference name="content">
<block type="customlogo/adminhtml_customlogo" name="customlogo" />
</reference>
</customlogo_adminhtml_customlogo_index>
</layout>

adminhtml tag in config.xml file does not work

I am new to magento and making a custom module and want to work on admin end but after installing extension I get this error:
Fatal error: Class 'Submitdigital_CustomLogo_Helper_Data' not found in /var/zpanel/hostdata/zadmin/public_html/unisport_com/app/Mage.php on line 547
After insatalling extension when I clear cashe it give me this error. After somestudy I found that the error is due to this file at path:
app/code/local/Submitdigital/CustomLogo/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Submitdigital_CustomLogo>
<version>0.1.0</version>
</Submitdigital_CustomLogo>
</modules>
<global>
<helpers>
<customlogo>
<class>Submitdigital_CustomLogo_Helper</class>
</customlogo>
</helpers>
<blocks>
<customlogo>
<class>Submitdigital_CustomLogo_Block</class>
</customlogo>
</blocks>
<models>
<customlogo>
<class>Submitdigital_CustomLogo_Model</class>
<resourceModel>customlogo_mysql4</resourceModel>
</customlogo>
<customlogo_mysql4>
<class>Submitdigital_CustomLogo_Model_Mysql4</class>
<entities>
<customlogo>
<table>customlogo</table>
</customlogo>
</entities>
</customlogo_mysql4>
</models>
<resources>
<customlogo_setup>
<setup>
<module>Submitdigital_CustomLogo</module>
<class>Mage_Eav_Model_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</customlogo_setup>
<customlogo_write>
<connection>
<use>core_write</use>
</connection>
</customlogo_write>
<customlogo_read>
<connection>
<use>core_read</use>
</connection>
</customlogo_read>
</resources>
</global>
<admin>
<routers>
<admin_customlogo>
<use>admin</use>
<args>
<module>Submitdigital_CustomLogo</module>
<frontName>admin_customlogo</frontName>
</args>
</admin_customlogo>
</routers>
</admin>
<adminhtml>
<menu>
<customlogo module="customlogo">
<title>SubmitDigital</title>
<sort_order>100</sort_order>
<children>
<customlogo module="customlogo">
<title>Manage Customlogo</title>
<sort_order>0</sort_order>
<action>customlogo/adminhtml_customlogo</action>
</customlogo>
</children>
</customlogo>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<customlogo translate="title" module="customlogo">
<title>SubmitDigital</title>
<sort_order>1000</sort_order>
<children>
<customlogo translate="title">
<title>Manage Customlogo</title>
<sort_order>0</sort_order>
</customlogo>
</children>
</customlogo>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<customlogo>
<file>customlogo.xml</file>
</customlogo>
</updates>
</layout>
</adminhtml>
<frontend>
<routers>
<customlogo>
<use>standard</use>
<args>
<module>Submitdigital_CustomLogo</module>
<frontName>customlogo</frontName>
</args>
</customlogo>
</routers>
<layout>
<updates>
<customlogo>
<file>customlogo.xml</file>
</customlogo>
</updates>
</layout>
</frontend>
</config>
all goes well with the file but when I add <adminhtml>...</adminhtml> in the file it gives the above error and hence I am not able to see anything at my admin end.
Please Help
here is my customlogo.xml
<?xml version="1.0"?>
<layout version="0.1.0">
<customlogo_adminhtml_customlogo_index>
<reference name="content">
<block type="customlogo/adminhtml_customlogo" name="customlogo" />
</reference>
</customlogo_adminhtml_customlogo_index>
</layout>
You have to create the helper class to fix this issue.
app/code/local/Submitdigital/CustomLogo/Helper/Data.php
class Submitdigital_CustomLogo_Helper_Data extends Mage_Core_Helper_Abstract
{
}
You have the following code to call the helper
<customlogo module="customlogo">
Here
module parameter is used to call the helper for translation.

Shows wrong url for a custom module magento

I have created a custom module 'Measurement'.and the frontend url is http://urbanior.grapesdigital.com/measurement/.
I want to add a link in left side like Measurements in my account page. so I added this in my measurement.xml page
measuement.xml
<customer_account>
<reference name="customer_account_navigation">
<action method="addLink" translate="label" module="measurement"><name>grapes_measurement</name><path>measurement/</path><label>Measurements</label></action>
</reference>
</customer_account>
config.xml
<?xml version="1.0"?>
<config>
<modules>
<Grapes_Measurement>
<version>0.1.0</version>
</Grapes_Measurement>
</modules>
<frontend>
<routers>
<measurement>
<use>standard</use>
<args>
<module>Grapes_Measurement</module>
<frontName>measurement</frontName>
</args>
</measurement>
</routers>
<layout>
<updates>
<measurement>
<file>measurement.xml</file>
</measurement>
</updates>
</layout>
</frontend>
<global>
<helpers>
<measurement>
<class>Grapes_Measurement_Helper</class>
</measurement>
</helpers>
<blocks>
<measurement>
<class>Grapes_Measurement_Block</class>
</measurement>
</blocks>
<models>
<measurement>
<class>Grapes_Measurement_Model</class>
<resourceModel>measurement_mysql4</resourceModel>
</measurement>
<measurement_mysql4>
<class>Grapes_Measurement_Model_Mysql4</class>
<entities>
<measurement>
<table>measurements</table>
</measurement>
</entities>
</measurement_mysql4>
</models>
<resources>
<measurement_setup>
<setup>
<module>Grapes_Measurement</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</measurement_setup>
<measurement_write>
<connection>
<use>core_write</use>
</connection>
</measurement_write>
<measurement_read>
<connection>
<use>core_read</use>
</connection>
</measurement_read>
</resources>
</global>
<admin>
<routers>
<measurement>
<use>admin</use>
<args>
<module>Grapes_Measurement</module>
<frontName>admin_measurement</frontName>
</args>
</measurement>
</routers>
</admin>
<adminhtml>
<menu>
<measurement module="measurement">
<title>Measurement</title>
<sort_order>100</sort_order>
<children>
<measurement module="measurement">
<title>Manage Measurement</title>
<sort_order>0</sort_order>
<action>admin_measurement/adminhtml_measurement</action>
</measurement>
</children>
</measurement>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<measurement translate="title" module="measurement">
<title>Measurement</title>
<sort_order>1000</sort_order>
<children>
<measurement translate="title">
<title>Manage Measurement</title>
<sort_order>0</sort_order>
</measurement>
</children>
</measurement>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<measurement>
<file>measurement.xml</file>
</measurement>
</updates>
</layout>
</adminhtml>
</config>
But when I click on this link, it shows the url like http://urbanior.grapesdigital.com/admin_measurement/
It is taking the admin route path instead of frontend path. I don't know how to resolve this issue. It opens the same page but URL is different.
please check in config.xml you have same route "measurement" for admin please remove admin route or change it.

Magento - plugin overwrite local.xml block

I have a local.xml file that has the following:
<default>
<cms_index_index translate="label">
<reference name="masthead">
<block type="page/html" template="cms/masthead/homepage.phtml" as="banners" />
</reference>
</cms_index_index translate="label">
</default>
I have a plugin that has it's own config.xml - I wish to override the above block with a template located in: /app/code/local/MageWorx/GeoIP/cms/homepage.phtml.
The config.xml file is however different and looks like:
<config>
<modules>
<MageWorx_GeoIP>
<version>1.0.7</version>
</MageWorx_GeoIP>
</modules>
<frontend>
<translate>
<modules>
<MageWorx_GeoIP>
<files>
<default>MageWorx_GeoIP.csv</default>
</files>
</MageWorx_GeoIP>
</modules>
</translate>
<routers>
<geoip>
<use>standard</use>
<args>
<module>MageWorx_GeoIP</module>
<frontName>geoip</frontName>
</args>
</geoip>
</routers>
<layout>
<updates>
<geoip>
<file>geoip.xml</file>
</geoip>
</updates>
</layout>
<events>
<controller_action_predispatch>
<observers>
<geoip>
<type>singleton</type>
<class>MageWorx_GeoIP_Model_Observer</class>
<method>geoipAutoswitcher</method>
</geoip>
</observers>
</controller_action_predispatch>
<controller_action_predispatch_directory_currency_switch>
<observers>
<geoip>
<type>singleton</type>
<class>MageWorx_GeoIP_Model_Observer</class>
<method>setCurrency</method>
</geoip>
</observers>
</controller_action_predispatch_directory_currency_switch>
</events>
</frontend>
<global>
<models>
<geoip>
<class>MageWorx_GeoIP_Model</class>
<resourceModel>geoip_mysql4</resourceModel>
</geoip>
<geoip_mysql4>
<class>MageWorx_GeoIP_Model_Mysql4</class>
</geoip_mysql4>
<core>
<rewrite>
<store>MageWorx_GeoIP_Model_Core_Store</store>
</rewrite>
</core>
</models>
<resources>
<geoip_setup>
<setup>
<module>MageWorx_GeoIP</module>
<class>MageWorx_GeoIP_Model_Mysql4_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</geoip_setup>
<geoip_write>
<connection>
<use>core_write</use>
</connection>
</geoip_write>
<geoip_read>
<connection>
<use>core_read</use>
</connection>
</geoip_read>
</resources>
<blocks>
<geoip>
<class>MageWorx_GeoIP_Block</class>
</geoip>
<adminhtml>
<rewrite>
<sales_order_view_info>MageWorx_Adminhtml_Block_Geoip_Adminhtml_Sales_Order_View_Info</sales_order_view_info>
<customer_online_grid>MageWorx_Adminhtml_Block_Geoip_Adminhtml_Customer_Online_Grid</customer_online_grid>
<system_store_edit_form>MageWorx_Adminhtml_Block_Geoip_Adminhtml_System_Store_Edit_Form</system_store_edit_form>
</rewrite>
</adminhtml>
<checkout>
<rewrite>
<onepage_billing>MageWorx_GeoIP_Block_Checkout_Onepage_Billing</onepage_billing>
<onepage_shipping>MageWorx_GeoIP_Block_Checkout_Onepage_Shipping</onepage_shipping>
</rewrite>
</checkout>
<customer>
<rewrite>
<address_edit>MageWorx_GeoIP_Block_Customer_Address_Edit</address_edit>
</rewrite>
</customer>
</blocks>
<helpers>
<geoip>
<class>MageWorx_GeoIP_Helper</class>
</geoip>
</helpers>
</global>
<adminhtml>
<acl>
<resources>
<all><title>Allow Everything</title></all>
<admin>
<children>
<system>
<children>
<config>
<children>
<mageworx_customers translate="title" module="mageworx">
<title>MageWorx > Customers</title>
<sort_order>1</sort_order>
<children>
<geoip translate="title" module="geoip">
<title>GeoIP Location</title>
</geoip>
</children>
</mageworx_customers>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<geoip>
<file>geoip.xml</file>
</geoip>
</updates>
</layout>
</adminhtml>
<default>
<mageworx_customers>
<geoip>
<enable_store_switcher>1</enable_store_switcher>
<enable_currency_switcher>1</enable_currency_switcher>
<force_store_view>1</force_store_view>
<store_switcher_scope>1</store_switcher_scope>
<disable_store_switcher_key>off</disable_store_switcher_key>
<store_switcher_exception_urls>/paypal/*</store_switcher_exception_urls>
<db_type>1</db_type>
<db_path>lib/GeoIP/GeoIP.dat</db_path>
<enable_billing_country>1</enable_billing_country>
<enable_shipping_country>1</enable_shipping_country>
<enable_address_country>1</enable_address_country>
</geoip>
</mageworx_customers>
</default>
Does anyone know where and what I should add in that config.xml to override the local.xml block?
you can not override any of your block or action with local.xml to config.xml
here is magento truth is
config.xml and local.xml are loaded together, along with any other xml file you place in app/local. They are loaded in Mage_Core_Model_Config::loadBase()
public function loadBase()
{
$etcDir = $this->getOptions()->getEtcDir();
$files = glob($etcDir.DS.'*.xml');
$this->loadFile(current($files));
while ($file = next($files)) {
$merge = clone $this->_prototype;
$merge->loadFile($file);
$this->extend($merge);
}
if (in_array($etcDir.DS.'local.xml', $files)) {
$this->_isLocalConfigLoaded = true;
}
return $this;
}
And if your want to understand more about local.xml, see this.
hope you can understand more clearly now.

Resources