6.0.0-beta1
7/8/25

[#9025] Horde Routes does not work
Summary Horde Routes does not work
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Not A Bug
Priority 1. Low
Owners chuck (at) horde (dot) org, mike (at) naberezny (dot) com
Requester jeromebri (at) hotmail (dot) com
Created 05/13/2010 (5535 days ago)
Due 05/13/2010 (5535 days ago)
Updated 05/30/2010 (5518 days ago)
Assigned 05/13/2010 (5535 days ago)
Resolved 05/30/2010 (5518 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
05/30/2010 01:41:46 AM Chuck Hagenbuch Comment #3
State ⇒ Not A Bug
Reply to this comment
See http://dev.horde.org/routes/integrate.html#preloading-controllers
specifically:

"Due to the way Horde/Routes makes use of regular expressions for URL 
recognition, Horde_Routes_Mapper requires a valid list of Controllers 
before it can match URL's."

If you add this line before the routematch() call:

$m->createRegs(array('articles'));

Then the example works fine.
05/13/2010 03:20:35 PM Jan Schneider Assigned to Chuck Hagenbuch
Assigned to Mike Naberezny
State ⇒ Assigned
Priority ⇒ 1. Low
Patch ⇒ No
 
05/13/2010 03:14:41 PM jeromebri (at) hotmail (dot) com Comment #2 Reply to this comment
It does not work when the name of an element is ":controller".
The following (example given in the documentation) does not work :

$m = new Horde_Routes_Mapper();
$m->connect(':controller/:action/:id');

$result =  $m->routematch( 'article/show/9' );

I'm using PHP 5.3.1-5.
05/13/2010 03:06:50 PM jeromebri (at) hotmail (dot) com Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Horde Routes does not work
Due ⇒ 05/13/2010
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
Reply to this comment
The following (example given in the documentation) does not work :

$m = new Horde_Routes_Mapper();
$m->connect(':controller/:action/:id');

$result =  $m->routematch( 'article/show/9' );

I'm using PHP 5.3.1-5.

Saved Queries