2

I know this question already asked, but still i can't solve my problem.

I have creating front-end & back-end custom pages. The code working in local server. But same code not working in Live Server.

My codes are following:

\app\code\local\EPayment\EPayment\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <EPayment_EPayment>
            <version>0.1.0</version>

        </EPayment_EPayment>
    </modules>
    <frontend>
        <routers>
            <epayment>
            <use>standard</use>
                <args>
                    <module>EPayment_EPayment</module>
                    <frontName>epayment</frontName>
                </args>
            </epayment>
        </routers>
        <layout>
            <updates>
                <epayment>
                <file>epayment.xml</file>
                </epayment>
            </updates>
        </layout>
    </frontend>
    <global>
        <helpers>
            <epayment>
                <class>EPayment_EPayment_Helper</class>
            </epayment>
        </helpers>
        <blocks>
            <epayment>
                <class>EPayment_EPayment_Block</class>
            </epayment>
        </blocks>
    </global>
    <admin>
        <routers>
            <epayment>
                <use>admin</use>
                <args>
                <module>EPayment_EPayment</module>
                <frontName>admin_epayment</frontName>
                </args>
            </epayment>
        </routers>
    </admin>
    <adminhtml>
        <layout>
            <updates>
                <epayment>
                    <file>epayment.xml</file>
                </epayment>
            </updates>
        </layout>
    </adminhtml>
</config>

\app\code\local\EPayment\EPayment\etc\adminhtml.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <menu>
      <epayment module="epayment">
        <title>EPayment</title>
        <sort_order>100</sort_order>
        <children>
          <epaymentbackend module="epayment">
            <title>EPayment</title>
            <sort_order>0</sort_order>
            <action>admin_epayment/adminhtml_epaymentbackend</action>
          </epaymentbackend>
        </children>
      </epayment>
    </menu>
    <acl>
      <resources>
        <all>
          <title>Allow Everything</title>
        </all>
        <admin>
          <children>
            <epayment translate="title" module="epayment">
              <title>EPayment</title>
              <sort_order>1000</sort_order>
              <children>
          <epaymentbackend translate="title">
            <title>EPayment</title>
          </epaymentbackend>
              </children>
            </epayment>
          </children>
        </admin>
      </resources>
    </acl>
</config>

app\design\adminhtml\default\default\layout\epayment.xml

<?xml version="1.0"?>
<layout>
    <epayment_adminhtml_epaymentbackend_index>
        <reference name="content">
            <block type="epayment/adminhtml_epaymentbackend" name="epaymentbackend_index" template="epayment/epaymentbackend.phtml"/>
        </reference>
    </epayment_adminhtml_epaymentbackend_index>

    <epayment_adminhtml_epaymentbackend_history>
        <reference name="content">
            <block type="epayment/adminhtml_epaymentbackend" name="epaymentbackend_history" template="epayment/history.phtml"/>
        </reference>
    </epayment_adminhtml_epaymentbackend_history>

</layout>

enter image description here

0

I think this is a block permission problem. To add your custom block's permission:

  • Go to System > Permissions > Blocks.
  • Click on Add New Block button.
  • Add your block's name in the Block Name field and set Yes for Is Allowed field.
  • Click Save Block button and flush Magento cache.

Now please check the page where the block should be rendered.

If the problem still exists, please check Magento log files as well as server's Apache error logs for more clues.

  • I have create new block permission and clear cache still empty check this link ibb.co/e0fg9m – Ramesh S Dec 21 '17 at 6:55
  • This is the block name right epaymentbackend_index – Ramesh S Dec 21 '17 at 6:55
  • And i check error_log also no error found. – Ramesh S Dec 21 '17 at 7:11
  • block name to be permitted should be epayment/adminhtml_epaymentbackend – Mohit Kumar Arora Dec 21 '17 at 7:50
  • Changed to epayment/adminhtml_epaymentbackend still empty bro – Ramesh S Dec 21 '17 at 7:54
0

in your config.xml define router this way

 <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <epayment before="Mage_Adminhtml">EPayment_EPayment</epayment>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

in your adminhtml.xml file action node should be

        <action>adminhtml/epaymentbackend/index</action>

in your epayment.xml file change handler

from

   <epayment_adminhtml_epaymentbackend_index>

TO

    <adminhtml_epaymentbackend_index>
  • Bro thanks for your code page showing 404 page – Ramesh S Dec 21 '17 at 10:49
  • Bro page showing 404 error ? – Ramesh S Dec 26 '17 at 6:44

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.