magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

Problems with Controller's Router

Open U12358 opened this issue 13 years ago • 2 comments

There are some problems with controllers

  1. Can't create Controller Instance (in 1.7.0.2 works fine)

class My_Module_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract { ... public function match(Mage_Core_Controller_Request_Http $request) { ... return $this->_controllerFactory->createController('My_Module_NameController', array('request' => $request); } ... }

error: Class My_Module_NameController does not exist";i:1;s:1799:"#0 /lib/Magento/Code/Generator/Class.php(52): ReflectionClass->__construct('My_Module_NameController...')

  1. Cant route to own Controller (step 1 in another way, in 1.6.2.0 works fine)

public function match(Mage_Core_Controller_Request_Http $request) { $request->setModuleName('My_Module') ->setControllerName('name') ->setActionName('index'); }

error: PAGE NOT FOUND

  1. Cant extend My_Module_AbstractController (it would be good to load)

class My_Module_NameController extends My_Module_AbstractController

error: Fatal error: Class 'My_Module_AbstractController' not found in .........

U12358 avatar Jun 11 '13 15:06 U12358

Hello. Unfortunately we are not able to help here with customization issues. I suggest you ask this question on Magento forums or Magento stackexchange site http://magento.stackexchange.com/

magento-team avatar Jun 12 '13 21:06 magento-team

It sounds like this is an error with the way the extension system works more so than his code from the bug report.

MattDunbar avatar Jun 14 '13 11:06 MattDunbar