[Symfony 1.4] Problèmede routage action does not exist ?
Posté : 26 mars 2010, 13:10
bonjour a tous j'ai pratiquement le même problème,
j'ai cette URL
au lieu de celle ci qui marche trés bien pour exécuter mon action
dois je modifier mon routing.yml? il est par defaut pour le moment
j'ai juste rajouter dans generator.yml une nouvelle action
ainsi que mon actions dans actions.class.php
l'url generé dans mon cache est de la forme suivante
puis j'ai ce message dans les logs
merci pour votre aide
Code : Tout sélectionner
404 | Not Found | sfError404Exception
Action "general/action" does not exist.j'ai cette URL
Code : Tout sélectionner
http://localhost/monprojet/web/frontend_dev.php/general/showInfos/action?id_hardware=2Code : Tout sélectionner
http://localhost/monprojet/web/frontend_dev.php/general/2/showInfosj'ai juste rajouter dans generator.yml une nouvelle action
Code : Tout sélectionner
object_actions:
_edit: { label: Editer }
showInfos: { label: Infos , action: showInfos } Code : Tout sélectionner
public function executeShowInfos (sfWebRequest $request)
{
$this->hardware = $this->getRoute()->getObject();
$this->setTemplate('showInfos');
}Code : Tout sélectionner
<td>
<ul class="sf_admin_td_actions">
<?php echo $helper->linkToEdit($hardware, array( 'label' => 'Editer', 'params' => array( ), 'class_suffix' => 'edit',)) ?>
<li class="sf_admin_action_show">
<?php echo link_to(__('Infos', array(), 'messages'), 'general/showInfos?id_hardware='.$hardware->getIdHardware(), array()) ?>
</li>
</ul>
</td>Code : Tout sélectionner
Match route "hardware_object" (/general/:idHardware/:action.:sf_format) for /general/showInfos/action with parameters array ( 'module' => 'general', 'action' => 'action', 'sf_format' => 'html', 'idHardware' => 'showInfos',)merci pour votre aide