2015-02-06 7 views
0

Magento 1.9.0.1을 사용하고 있으며 관리자 패널에 새 탭을 추가 한 새 확장 프로그램을 만들었습니다. 여기Magento - 새 Adminhtml 페이지를 만들 때 오류 404 발생

enter image description here

내가 내 파일에있는 것입니다. /app/code/community/VivasIndustries/SmsNotification/etc/config.xml :에서

여기

<?xml version="1.0"?> 
<config> 
    <modules> 
    <VivasIndustries_SmsNotification> 
     <version>0.1.0</version> 
    </VivasIndustries_SmsNotification> 
    </modules> 
    <global> 
    <models> 
     <smsnotification> 
      <class>VivasIndustries_SmsNotification_Model</class> 
     </smsnotification> 
    </models> 
    <events> 
     <sales_order_save_after> 
      <observers> 
       <vivasindustries_smsnotification> 
        <class>smsnotification/observer</class> 
        <method>orderSaved</method> 
       </vivasindustries_smsnotification> 
      </observers> 
     </sales_order_save_after> 
    </events> 
    <helpers> 
     <smsnotification> 
      <class>VivasIndustries_SmsNotification_Helper</class> 
     </smsnotification> 
     <adminhtml> 
      <rewrite> 
       <data>VivasIndustries_SmsNotification_Helper_Adminhtml_Data</data> 
      </rewrite> 
     </adminhtml> 
    </helpers> 
    </global> 
    <admin> 
     <routers> 
      <adminhtml> 
       <args> 
        <modules> 
         <VivasIndustries_SmsNotification before="Mage_Adminhtml">VivasIndustries_SmsNotification_Adminhtml</VivasIndustries_SmsNotification> 
        </modules> 
       </args> 
      </adminhtml> 
     </routers> 
    </admin> 
</config> 

는 난에 무엇을 : 기타/응용 프로그램/코드/사회/VivasIndustries/SmsNotification// adminhtml.xml : /app/code/community/VivasIndustries/SmsNotification/controllers/Adminhtml/SmsNotification/AboutController.php : 여기

<?xml version="1.0"?> 
<config> 
    <menu> 
     <vivassms translate="title" module="smsnotification"> 
      <title>SMS Center</title> 
      <sort_order>110</sort_order> 
      <children> 
       <sendsms translate="title" module="smsnotification"> 
        <title>Send SMS</title> 
        <action>adminhtml/magesms_sendsms</action> 
        <sort_order>1</sort_order> 
       </sendsms> 
       <settings> 
        <title>Settings</title> 
        <action>adminhtml/system_config/edit/section/vivas/</action> 
        <sort_order>10</sort_order> 
       </settings> 
       <about translate="title" module="smsnotification"> 
        <title>About</title> 
        <action>adminhtml/smsnotification_about</action> 
        <sort_order>11</sort_order> 
       </about> 
      </children> 
     </vivassms> 
    </menu> 
    <acl> 
     <resources> 
      <admin> 
       <children> 
        <vivassms> 
         <title>SMS</title> 
         <children> 
          <sendsms translate="title" module="smsnotification"> 
           <title>Send SMS</title> 
          </sendsms> 
          <settings> 
           <title>Settings</title> 
           <children> 
            <smsprofile translate="title" module="smsnotification"> 
             <title>Edit user account</title> 
            </smsprofile> 
           </children> 
          </settings> 
          <about translate="title" module="smsnotification"> 
           <title>About</title> 
          </about> 
         </children> 
        </vivassms> 
        <system> 
         <children> 
          <config> 
           <children> 
            <vivassms translate="title" module="smsnotification"> 
             <title>Vivas SMS</title> 
            </vivassms> 
           </children> 
          </config> 
         </children> 
        </system> 
       </children> 
      </admin> 
     </resources> 
    </acl> 
</config> 

내가이 무엇인지입니다

<?php 

class VivasIndustries_SmsNotification_Adminhtml_AboutController extends Mage_Adminhtml_Controller_Action 
{ 
    public function preDispatch() 
    { 
    return Mage_Adminhtml_Controller_Action::preDispatch(); 
    } 

    public function indexAction() 
    { 
     $this->_initAction(); 
     $i8ee45e0018a32fb1a855b82624506e35789cc4d2 = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'my_block_name_here', array('template' => 'vivasindustries/smsnotification/about.phtml')); 
     $this->getLayout()->getBlock('content')->append($i8ee45e0018a32fb1a855b82624506e35789cc4d2); $this->renderLayout(); 
    } 
    protected function _initAction() 
    { 
    parent::_initAction(); 
    $this->_setActiveMenu('smsnotification/about') ->_title(Mage::helper('smsnotification')->__('About')); 
    return $this; 
    } 
} 
/app/design/adminhtml/default/default/template/vivasindustries/smsnotification/about.phtml : 여기

난에 무엇을 가지고 내가 오류 404받은 About 페이지를 열려고

<?php 
/** 
* Mage SMS - SMS notification & SMS marketing 
* 
* NOTICE OF LICENSE 
* 
* This source file is subject to the BSD 3-Clause License 
* It is available through the world-wide-web at this URL: 
* http://opensource.org/licenses/BSD-3-Clause 
* 
* @category Vivas 
* @package  Vivas_smsnotification 
* @copyright Copyright (c) 2012-2014 Vivas s.r.o. (http://www.mage-sms.com) 
* @license  http://opensource.org/licenses/BSD-3-Clause 
*/ 
?> 
<h2> 
<?php 
echo Mage::helper('smsnotification')->__('About'); ?></h2> 
<b><?php echo Mage::helper('smsnotification')->__('Mage SMS module 2013-%s, version ', date('Y')).Mage::getConfig()->getModuleConfig('VivasIndustries_SmsNotification')->version; ?></b><br /> 
<?php echo Mage::helper('smsnotification')->__('Copyright © Vivas s.r.o., All rights reserved'); ?><br /><br /> 

<b><?php echo Mage::helper('smsnotification')->__('Supported Magento versions:'); ?></b><?php echo Mage::getConfig()->getNode('default/config/supported')->versions; ?><br /><br /> 

<b><?php echo Mage::helper('smsnotification')->__('Developer:'); ?></b><br /><?php echo Mage::helper('smsnotification')->__('Vivas s.r.o.'); ?><br /><br /> 

<b><?php echo Mage::helper('smsnotification')->__('Address:'); ?></b><br /><?php echo Mage::helper('smsnotification')->__('B. Nemcove 767/13'); ?><br /><?php echo Mage::helper('smsnotification')->__('78701 Sumperk'); ?><br /> 
<?php echo Mage::helper('smsnotification')->__('Czech Republic'); ?><br /><?php echo Mage::helper('smsnotification')->__('VAT: CZ29444268'); ?><br /><br /><b><?php echo Mage::helper('smsnotification')->__('Office Telephone:'); ?></b><br /> 
<?php echo Mage::helper('smsnotification')->__('+420 581 110 998'); ?><br /><br /><b><?php echo Mage::helper('smsnotification')->__('E-mail:'); ?></b><br /> 

<a href="mailto:<?php echo Mage::helper('smsnotification')->__('[email protected]'); ?>"><?php echo Mage::helper('smsnotification')->__('[email protected]'); ?></a><br /> 
<a href="mailto:<?php echo Mage::helper('smsnotification')->__('[email protected]'); ?>"><?php echo Mage::helper('smsnotification')->__('[email protected]'); ?></a><br /><br /> 

<b><?php echo Mage::helper('smsnotification')->__('Web:'); ?></b><br /> 
<a href="http://<?php echo Mage::helper('smsnotification')->__('www.mage-sms.com'); ?>"><?php echo Mage::helper('smsnotification')->__('www.mage-sms.com'); ?></a><br /><br /> 

<b><?php echo Mage::helper('smsnotification')->__('Facebook:'); ?></b><br /><iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fmagentosms&amp;width&amp;layout=button_count&amp;action=like&amp;show_faces=false&amp;share=true&amp;height=21&amp;appId=242281502635180" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe><br /><br /> 

<b><?php echo Mage::helper('smsnotification')->__('Manual:'); ?></b><br /><a href="http://<?php echo Mage::helper('smsnotification')->__('www.mage-sms.com/manual.html'); ?>"><?php echo Mage::helper('smsnotification')->__('www.mage-sms.com/manual.html'); ?></a><br /><br /> 
<img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'smsnotification/Vivas-logo.gif'; ?>" alt="Vivas" /> 

이 오류를 수정하고 왜이 문제가 발생했는지에 대한 정보를 제공해 주시겠습니까?

편집 : 오류의 이미지 : 사전에

enter image description here

감사합니다!

+1

Magento는 사람들이 당신을 도울 수있는 도움이되는 많은 다른 404 페이지를 가지고 있습니다 : http://alanstorm.com/magentos_many_404_pages 또한 내 Better404 모듈 (무료)을 사용해보십시오 - Magento의 MVC-404를 만듭니다 페이지를 조금 더 문제를 추적에 유용 http://alanstorm.com/magento-404-debug –

+0

답변 주셔서 감사합니다! 내 질문을 업데이트하고 추가 기능을 설치할 때 404 오류 그림을 추가했습니다! 문제가있는 곳을 조언 해 주시겠습니까? 미리 감사드립니다! –

답변

0

XML 파일에 있어야합니다. 오류 페이지 하단에서 다른 주소 (../Smsnotification/ ..)를 찾고 있기 때문에 컨트롤러가 : ../SmsNotification/ ..)에 있습니다. 이 부분에 있어야합니다 :

<about translate="title" module="smsnotification"> 
        <title>About</title> 
        <action>adminhtml/smsnotification_about</action> 
        <sort_order>11</sort_order> 
</about> 

smsNotification을 시도해보고 작동하는지 확인하십시오.

+0

내가 한 말을했는데 내가 얻은 오류 보고서가있다 : http://pastebin.com/GYFeGTrt –

+0

이제 컨트롤러가 Magento에 의해 발견되었지만 그 안의 클래스를 찾을 수 없다. 컨트롤러 클래스 이름을 class class VivasIndustries_SmsNotification_Adminhtml_SmsNotification_AboutController'로 변경하십시오. – Hatef