Skip to main content
added 5 characters in body
Source Link

This is the path reference that you are provided in a layout file

<path>earnings/earnings/</path>

This will set your link to this path http://www.mysitewebsite.com/earnings/earnings. When magentoMagento looks for this path, it cannot find a valid controller definition. That is why it throws 404 error. So set your path to

  <path>earnings/</path>
         or
   <path>earnings/index/</path>

will solve your issue. Now the link looklooks like http://www.mysitewebsite.com/earnings/index/. You have defined your block for this specific urlURL. Note you have used earning_index_index handle in your layout file. This handle will be processed by magnetoMagento only when http://www.mysitewebsite.com/earnings/index/ urlURL get requested.

Note: In order to work this urlURL perfectly, you should have an IndexController.php is defined for your module and this file should hold this method.

public function indexAction() {

   $this->loadLayout();
   $this->renderLayout();
}

If this method and this file isare not defined for your module, Magento will throw 404 error again.

This is the path reference that you are provided in layout file

<path>earnings/earnings/</path>

This will set your link to this path http://www.mysite.com/earnings/earnings. When magento looks for this path, it cannot find a valid controller definition. That is why it throws 404 error. So set your path to

  <path>earnings/</path>
         or
   <path>earnings/index/</path>

will solve your issue. Now the link look like http://www.mysite.com/earnings/index/. You have defined your block for this specific url. Note you have used earning_index_index handle in your layout file. This handle will be processed by magneto only when http://www.mysite.com/earnings/index/ url get requested.

Note: In order to work this url perfectly, you should have an IndexController.php is defined for your module and this file should hold this method.

public function indexAction() {

   $this->loadLayout();
   $this->renderLayout();
}

If this method and this file is not defined for your module, Magento will throw 404 error again.

This is the path reference that you are provided in a layout file

<path>earnings/earnings/</path>

This will set your link to this path http://www.website.com/earnings/earnings. When Magento looks for this path, it cannot find a valid controller definition. That is why it throws 404 error. So set your path to

  <path>earnings/</path>
         or
   <path>earnings/index/</path>

will solve your issue. Now the link looks like http://www.website.com/earnings/index/. You have defined your block for this specific URL. Note you have used earning_index_index handle in your layout file. This handle will be processed by Magento only when http://www.website.com/earnings/index/ URL get requested.

Note: In order to work this URL perfectly, you should have an IndexController.php is defined for your module and this file should hold this method.

public function indexAction() {

   $this->loadLayout();
   $this->renderLayout();
}

If this method and this file are not defined for your module, Magento will throw 404 error again.

Source Link
Rajeev K Tomy
  • 17.3k
  • 6
  • 63
  • 103

This is the path reference that you are provided in layout file

<path>earnings/earnings/</path>

This will set your link to this path http://www.mysite.com/earnings/earnings. When magento looks for this path, it cannot find a valid controller definition. That is why it throws 404 error. So set your path to

  <path>earnings/</path>
         or
   <path>earnings/index/</path>

will solve your issue. Now the link look like http://www.mysite.com/earnings/index/. You have defined your block for this specific url. Note you have used earning_index_index handle in your layout file. This handle will be processed by magneto only when http://www.mysite.com/earnings/index/ url get requested.

Note: In order to work this url perfectly, you should have an IndexController.php is defined for your module and this file should hold this method.

public function indexAction() {

   $this->loadLayout();
   $this->renderLayout();
}

If this method and this file is not defined for your module, Magento will throw 404 error again.