Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

New router path giving always 404 error
 
hippoglollum
Sr. Member
 
Total Posts:  97
Joined:  2010-04-07
 

Following this article
http://inchoo.net/ecommerce/magento/magento-email/magento-custom-email-contact-form-with-notification-system/

i tried to setup a simple form.

My problem is that if i call the URL I always get the Magento 404 error page.

I try the same code in another magento instance and it doesn’t work, so maybe I’m wrong.

I also tried to simplify the code.

/app/etc/modules/Mycomp_Preventivo.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <
modules>
        <
Mycomp_Preventivo>
            <
active>true</active>
            <
codepool>local</codepool>
        </
Mycomp_Preventivo>
    </
modules>    
</
config>

app/code/local/Mycomp/Preventivo/etc/config.xml

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

app/code/local/Mycomp/Preventivo/controllers/IndexController.php

class Mycomp_Preventivo_IndexController extends Mage_Core_Controller_Front_Action {        
    
public function indexAction() {
        
echo 'Hello Index!';
    
}
}

Can someone help me?
thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
hippoglollum
Sr. Member
 
Total Posts:  97
Joined:  2010-04-07
 

I retry using the exact code as the example and it works properly…

So the thread can be closed!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top