Jump to content

hookModuleRoutes() changes since ?


Recommended Posts

Hello all,
I'm developing a module which use the nice hook hookModuleRoutes(). I initially started the development on PS and everything is working fine with regards to hookModuleRoutes.
As required by the core, my module returns an array with two entries indexed with following naming convention:
return array('module-tplmcompat-results' => array(

'controller' => 'results',

'rule' =>  'module{/:module}{/:controller}{/:toto}',

'keywords' => array(

'module'  => array('regexp' => '[\w]+', 'param' => 'module'),

'controller' => array('regexp' => '[\w]+',  'param' => 'controller')

'toto' => array('regexp' => '[\w]+',  'param' => 'toto')


'params' => array(

'fc' => 'module',

'module' => 'tplmcompat',

'controller' => 'results'


In, the rewritten url is good and works perfectly. I.e. toto value is correctly encoded in the url:
site store url ......../module/tplmcompat/results/totovalue
However, since and also in, once installed, all front pages are broken until I had to change:
return array('module-tplmcompat-results' => array(
return array('tplmcompat-results' => array(  # remove "module-" keyword
After this patch, the module works however, impossible to have the good rewritten url. I definitively have:
site store ...../module/tplmcompat/results?toto=totovalue
I didn't see lot of post concerning hookModuleRoutes()... I also saw changes on the Dispatcher and Link classes in and Somebody can help me ? What could be wring here ?

Edited by dbrondy (see edit history)
Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...