#5974: Routing error
---------------------------------------+------------------------------------
    Reporter:  ecamaj                  |         Owner:           
        Type:  Bug                     |        Status:  reopened 
    Priority:  Medium                  |     Milestone:  1.2.x.x  
   Component:  General                 |       Version:  1.2 Final
    Severity:  Normal                  |    Resolution:           
    Keywords:  routes, routing, index  |   Php_version:  PHP 5    
Cake_version:                          |  
---------------------------------------+------------------------------------
Changes (by ecamaj):

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

Comment:

 Hello guys, nice talking to you.

 I think you might be little off here or i don't understand the book, and i
 don't think i don't understand it. :)

 not defining what :category will accept just gives every '''format''' to
 be accepted, that is not the problem here.

 if i put

 {{{
 <?php
 Router::connect('/:category', array('controller' => 'categories', 'action'
 => 'view', 'category'=>null), array('category'=>'[a-z]+'));
 ?>
 }}}
 (maybe regex syntax wrong) or some other regular expression that accepts
 all characters, then the form will be accurate and the routing will still
 be wrong.

 But, as i said and you chose to ignore it and not mention it, that is not
 the issue here. The issue is that we created the link '''without'''
 specifying the parameter 'category' and the router is translating it
 although he shouldn't because no default value for it has been set.

 I'm just extracting conclusions from the book info.

 Please correct me if i'm wrong.

 Thank you.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/5974#comment:3>
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to