magento 404 не найден

Я новичок в мадженто. Я следую его руководству и создаю свой первый модуль. но он возвращает 404 не найдено:

config.xml ниже:

<?xml version='1.0'?>
<config>    
    <modules>
        <Magentotutorial_Helloworld>
            <version>0.1.0</version>
        </Magentotutorial_Helloworld>
    </modules>

</config>

и Magento_Helloworld.xml:

<config>
    <modules>
        <Magentotutorial_Helloworld>
            <active>true</active>
            <codePool>local</codePool>
        </Magentotutorial_Helloworld>
    </modules>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Magentotutorial_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>  
    </frontend>
</config>

и контроллер:

class Magentotutorial_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {
        die( 'Hello Index!');
    }

}

теперь я пытаюсь

http://127.0.0.1/magento/index.php/helloworld/index/index

и видим 404 страницу! в чем проблема?

Я очистил кеш от администратора!


person M Gholami    schedule 15.11.2015    source источник
comment
Вы указали модуль в system->configuration tab advanced.   -  person Qaisar Satti    schedule 16.11.2015


Ответы (2)


Содержимое ваших xml-файлов должно выглядеть так: 'app/etc/modules/Magentotutorial_Helloworld.xml':

<?xml version="1.0"?>
<config>
    <modules>
        <Magentotutorial_Helloworld>
            <active>true</active>
            <codePool>local</codePool>
        </Magentotutorial_Helloworld>
    </modules>
</config>

'приложение/код/локальные/Magentotutorial/Helloworld/etc/config.xml':

<?xml version="1.0"?>
<config>    
    <modules>
        <Magentotutorial_Helloworld>
            <version>0.1.0</version>
        </Magentotutorial_Helloworld>
    </modules>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Magentotutorial_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>  
    </frontend>
</config>

P.S. контроллер должен находиться в каталоге app/code/local/Magentotutorial/Helloworld/controllers/.

person Neodan    schedule 15.11.2015
comment
Не работает!! его контроллер находится в каталоге «контроллеры» - person M Gholami; 16.11.2015
comment
Вы проверяли логи (журнал ошибок php, exception.log, system.log), может у вас ошибка в другом месте? - person Neodan; 16.11.2015
comment
ой! Я начинающий ! Я создал «локальный» каталог в другой папке!! - person M Gholami; 16.11.2015

person    schedule
comment
Пожалуйста, объясните свое решение немного подробнее, чтобы будущие искатели могли применить его к своей ситуации. - person Brody; 08.02.2017