#6155: Form Helper ignores custom prefix routes for Form->create when there are parameters passed ----------------------------------------+----------------------------------- Reporter: Kit | Type: Bug Status: new | Priority: Low Milestone: 1.2.x.x | Component: Helpers Version: 1.2 Final | Severity: Minor Keywords: Form Helper URL Routing | Php_version: PHP 5 Cake_version: 1.2.1.8004 | ----------------------------------------+----------------------------------- Our app uses a custom prefix ("sitename") for almost all pages. We also use plugins for almost all app functionality.
The error is in one plugin ("Documents"); I have a controller "views" (I acknowledge the break with CakePHP naming conventions; we're porting an old vanilla PHP app to Cake), which has an action "admin_edit" (we use admin routing too). So the URL is of the form: /<sitename>/admin/documents/views/edit/<ID> With all that junk going on in our URLs, we tend to use the array() syntax for URLs. $html->url(array('sitename' => 'test', 'plugin' => 'documents', 'controller' => 'views', 'action' => 'admin_edit', 70)); Performs as expected, giving me a full URL as above (where the ID is 70). However, the form->create function will move the sitename prefix to a named URL variable at the end when the request URL contains an ID (so it doesn't happen in my admin_add action, or if I omit the ID). Example: /admin/documents/views/edit/70/70/sitename:test If I pass the URL as a string, the problem doesn't occur. I can't mix $form->create with $html->url because then I get two /index.php/ URL parts (I'm running on IIS). -- Ticket URL: <https://trac.cakephp.org/ticket/6155> 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 -~----------~----~----~----~------~----~------~--~---