Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/11/2011, 09:20
Avatar de Uncontroled_Duck
Uncontroled_Duck
Colaborador
 
Fecha de Ingreso: mayo-2011
Ubicación: Málaga [Spain]
Mensajes: 806
Antigüedad: 12 años, 11 meses
Puntos: 261
Respuesta: Navigation y comportamiento raro

Cita:
Iniciado por GatorV Ver Mensaje
¿Podrías poner tus routes? Al parecer el problema puede venir de ahí...
Hola GatorV, dejo los routers

Código PHP:
Ver original
  1. //bootstrap
  2. protected function _initRoutes()
  3. {
  4.     $frontController = Zend_Controller_Front::getInstance();
  5.     $router = $frontController->getRouter();
  6.     $router->removeDefaultRoutes();
  7.  
  8.     $lang = '([a-zA-Z]{2})';
  9.     $module = '(?:(\w+))';
  10.     $controller = '(?:(\w+))';
  11.     $action = '(?:(\w+))';
  12.     $param = '(?:(\w+))';
  13.  
  14.     //Route index
  15.     $router->addRoute(
  16.             'default', new Zend_Controller_Router_Route_Regex(
  17.                     'es/auth/secure/login/' . $param,
  18.                     array(
  19.                         'lang'       => 'es',
  20.                         'module'     => 'auth',
  21.                         'controller' => 'secure',
  22.                         'action'     => 'login'
  23.                     ),
  24.                     array(
  25.                         1 => 'lang',
  26.                         2 => 'module',
  27.                         3 => 'controlelr',
  28.                         4 => 'action'
  29.                     ),
  30.                     '%s/%s/%s/%s/')
  31.     );
  32.  
  33.     //Route index
  34.     $router->addRoute(
  35.             'ind', new Zend_Controller_Router_Route_Regex(
  36.                     '(.*)',
  37.                     array(
  38.                         'lang'       => ':lang',
  39.                         'module'     => 'default',
  40.                         'controller' => 'index',
  41.                         'action'     => 'index'
  42.                     ),
  43.                     array(1 => 'lang'),
  44.                     '/')
  45.     );
  46.  
  47.     //Route lang
  48.     $router->addRoute(
  49.             'lan', new Zend_Controller_Router_Route_Regex(
  50.                     $lang,
  51.                     array(
  52.                         'lang'       => ':lang',
  53.                         'module'     => 'default',
  54.                         'controller' => 'index',
  55.                         'action'     => 'index'
  56.                     ),
  57.                     array(
  58.                         1 => 'lang'
  59.                     ),
  60.                     '%s/')
  61.     );
  62.  
  63.     //Route lang/module
  64.     $router->addRoute(
  65.             'lanmod', new Zend_Controller_Router_Route_Regex(
  66.                     $lang . '/' . $module,
  67.                     array(
  68.                         'lang'       => ':lang',
  69.                         'module'     => ':module',
  70.                         'controller' => 'index',
  71.                         'action'     => 'index'
  72.                     ),
  73.                     array(
  74.                         1 => 'lang',
  75.                         2 => 'module'
  76.                     ),
  77.                     '%s/%s/')
  78.     );
  79.  
  80.     //Route lang/module/controller
  81.     $router->addRoute(
  82.             'lanmodcon', new Zend_Controller_Router_Route_Regex(
  83.                     $lang . '/' . $module . '/' . $controller,
  84.                     array(
  85.                         'lang' => ':lang',
  86.                         'module' => ':module',
  87.                         'controller' => ':controller',
  88.                         'action' => 'index'
  89.                     ),
  90.                     array(
  91.                         1 => 'lang',
  92.                         2 => 'module',
  93.                         3 => 'controller'
  94.                     ),
  95.                     '%s/%s/%s/')
  96.     );
  97.  
  98.     //Route lang/module/controller/action
  99.     $router->addRoute(
  100.             'lanmodconact', new Zend_Controller_Router_Route_Regex(
  101.                     $lang . '/' . $module . '/' . $controller . '/' . $action,
  102.                     array(
  103.                         'lang' => ':lang',
  104.                         'module' => ':module',
  105.                         'controller' => ':controller',
  106.                         'action' => ':action'
  107.                     ),
  108.                     array(
  109.                         1 => 'lang',
  110.                         2 => 'module',
  111.                         3 => 'controller',
  112.                         4 => 'action'
  113.                     ),
  114.                     '%s/%s/%s/%s/')
  115.     );
  116.  
  117.     //Route lang/module/controller/action/param1
  118.     $router->addRoute(
  119.             'p1', new Zend_Controller_Router_Route_Regex(
  120.                     $lang . '/' . $module . '/' . $controller . '/' . $action . '/' . $param,
  121.                     array(
  122.                         'lang'      => ':lang',
  123.                         'module'    => ':module',
  124.                         'controller' => ':controller',
  125.                         'action'    => ':action',
  126.                         'param1'        => ':param1'
  127.                     ),
  128.                     array(
  129.                         1 => 'lang',
  130.                         2 => 'module',
  131.                         3 => 'controller',
  132.                         4 => 'action',
  133.                         5 => 'param1'
  134.                     ),
  135.                     '%s/%s/%s/%s/%s')
  136.     );
  137.  
  138.     //Route lang/module/controller/action/param1/param2
  139.     $router->addRoute(
  140.             'p1p2', new Zend_Controller_Router_Route_Regex(
  141.                     $lang . '/' . $module . '/' . $controller . '/' . $action . '/' . $param . '/' . $param,
  142.                     array(
  143.                         'lang' => ':lang',
  144.                         'module' => ':module',
  145.                         'controller' => ':controller',
  146.                         'action' => ':action',
  147.                         'param1' => ':param1',
  148.                         'param2' => ':param2'
  149.                     ),
  150.                     array(
  151.                         1 => 'lang',
  152.                         2 => 'module',
  153.                         3 => 'controller',
  154.                         4 => 'action',
  155.                         5 => 'param1',
  156.                         6 => 'param2'
  157.                     ),
  158.                     '%s/%s/%s/%s/%s/%s')
  159.     );
  160.  
  161.     //Route lang/module/controller/action/param1/param2/param3
  162.     $router->addRoute(
  163.             'p1p2p3', new Zend_Controller_Router_Route_Regex(
  164.                     $lang . '/' . $module . '/' . $controller . '/' . $action . '/' . $param . '/' . $param . '/' . $param,
  165.                     array(
  166.                         'lang'      => ':lang',
  167.                         'module'    => ':module',
  168.                         'controller' => ':controller',
  169.                         'action'    => ':action',
  170.                         'param1'    => ':param1',
  171.                         'param2'    => ':param2',
  172.                         'param3'    => ':param3'
  173.                     ),
  174.                     array(
  175.                         1 => 'lang',
  176.                         2 => 'module',
  177.                         3 => 'controller',
  178.                         4 => 'action',
  179.                         5 => 'param1',
  180.                         6 => 'param2',
  181.                         7 => 'param3'
  182.                     ),
  183.                     '%s/%s/%s/%s/%s/%s/%s')
  184.     );
  185. }
Saludos,
__________________
Todos agradeceremos que pongas el código en su respectivo Highlight