Hi,

I create a "site/application" that automatically build navigation (for menu,
...) from database and i also created an .ini file with routes. I also use
translation in controller name.

EX: Part of routes.ini file
.....

; Login - /fr/questions or /de/fragen
routes.faq_index.route = ":lang/:@controller"
routes.faq_index.defaults.module = default
routes.faq_index.defaults.controller = faq
routes.faq_index.defaults.action = index
routes.faq_index.reqs.lang = "^(fr|de)$"

; Product index - /fr/produits /de/produkte
routes.product_index.route = ":lang/:@controller"
routes.product_index.defaults.module = default
routes.product_index.defaults.controller = product
routes.product_index.defaults.action = supplierlist
routes.product_index.reqs.lang = "^(fr|de)$"

...


When i open url "/fr/produits" or "/de/produkte" all is fine, page show
correct results, one in french and other page in german.

If now i go to "/fr/questions" or in german (is before in the routes.ini
file)... i got that error below. If i inverse this 2 routes, it works with
"/fr/questions" but no more with "/fr/produits" (take index action and not
supplierlist)



**************************************
An error occurred
Page not found
Exception information:

Message: Action "supplierlist" does not exist and was not trapped in
__call()
Stack trace:

#0
/var/www/cms.1234.local/bin/1234cms/library/Zend/Controller/Action.php(518):
Zend_Controller_Action->__call('supplierlistAct...', Array)
#1
/var/www/cms.1234.local/bin/1234cms/library/Zend/Controller/Dispatcher/Standard.php(295):
Zend_Controller_Action->dispatch('supplierlistAct...')
#2
/var/www/cms.1234.local/bin/1234cms/library/Zend/Controller/Front.php(954):
Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http),
Object(Zend_Controller_Response_Http))
#3
/var/www/cms.1234.local/bin/1234cms/library/Zend/Application/Bootstrap/Bootstrap.php(97):
Zend_Controller_Front->dispatch()
#4 /var/www/cms.1234.local/bin/1234cms/library/Zend/Application.php(366):
Zend_Application_Bootstrap_Bootstrap->run()
#5 /var/www/cms.1234.local/bin/1234cms/public/index.php(26):
Zend_Application->run()
#6 {main}  

Request Parameters:

array (
  'lang' => 'fr',
  'controller' => 'faq',
  'module' => 'default',
  'action' => 'supplierlist',    <--- THIS IS WRONG, MUST TO BE "INDEX"
) 
**************************************


In the navigation i added page like that:

...
$page = new Zend_Navigation_Page_Mvc(array( 
        'id'    => $vo->getSiteNavigationId(),
        'label'    => $vo->getLabel(),  
        'title'    => $vo->getTitle(),  
        'route'    => $vo->getRoute()
        )
);
...



So why the action parameter is wrong ??
An idea ?



Thanks in advance,
Michael

--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Wrong-action-in-translated-controller-route-tp3846693p3846693.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to