_forward does not work Magento backend

When you develop a custom module, you usually use _forward method in backend. Sometimes, you might get this error, _forward method generates a 404 not found page. The controller you have following actions:

public function newAction() {
public function editAction() {

It is quite simple but when you click on button to add New item, it will generate 404 not found page. The problem is caused of Magento router. If you look at your config.xml file, you will see this code for defining router in frontend.


Then to make the admin url work, you can simple define router for the backend which should look like this:


3 thoughts on “_forward does not work Magento backend”

3 Responses to _forward does not work Magento backend

  • Question

    great it worked for me
    I have a question from same problem can you please answer.

    When editing any item URL contains Id for current row being edited as follow

    But for new record we will not have this id, but i wonder in saveAction under controller this ID is being fetched from URL as follow


    record is still being added though the ID is null,
    I want primary key id for record that is being added

    How to get this record, in saveAction


  • Neo

    When you add new item, the id is NULL but the query to save that item into database will set ID (ID is auto-increment). Therefore, it is still added.

  • Rajesh
    Rajesh on June 11, 2015 at 2:21 pm said:

    Hello Neo I have made the changes as per you suggestion,It is redirecting to the Index Action when we click on Add Item Button.

    Can you please suggest me to resolve this issue.