#6252: Recent change in Router breaks url creation for plugin-routes
---------------------------+------------------------------------------------
    Reporter:  stevieboy   |         Owner:           
        Type:  Test Case   |        Status:  reopened 
    Priority:  Medium      |     Milestone:  1.2.x.x  
   Component:  General     |       Version:  1.2 Final
    Severity:  Major       |    Resolution:           
    Keywords:              |   Php_version:  PHP 5    
Cake_version:  1.2.2.8120  |  
---------------------------+------------------------------------------------
Changes (by filburt1):

  * status:  closed => reopened
  * resolution:  invalid =>

Comment:

 I can confirm that this still happens in the nightly build of CakePHP as
 of today, 5/18/09.
 [[BR]][[BR]]
 These circumstances must exist:

 * The plugin specified must exist

 * The controller must be specified, and must equal the name of the plugin

 * The action must be explicitly "index", or omitted entirely

 * The admin context is the same as the location where the URL was
 generated (for example, if in /admin, "admin" must be true), or omitted
 entirely
 [[BR]][[BR]]
 If any of the following are not the case, the URL is generated properly.
 For example, if I have:

 {{{
 array("plugin" => "static_content", "controller" => "static_content",
 "action" => "index", Configure::read("Routing.admin") => true)
 }}}

 ...and I'm already in /admin, the link generated is
 "/admin/static_content/:controller". The same is true if I omit "action"
 or the admin routing. If I instead try:

 {{{
 array("plugin" => "doesntexist", "controller" => "doesntexist", "action"
 => "index", Configure::read("Routing.admin") => true)
 }}}

 ...then the URL is "/admin/doesntexist" which is correct.
 [[BR]][[BR]]
 I would submit a formal test case but I see no instructions for how to do
 so.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6252#comment:4>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to