par
rs232 » 26 mars 2010, 13:10
bonjour a tous j'ai pratiquement le même problème,
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=2
au lieu de celle ci qui marche trés bien pour exécuter mon action
Code : Tout sélectionner
http://localhost/monprojet/web/frontend_dev.php/general/2/showInfos
dois je modifier mon routing.yml? il est par defaut pour le moment
j'ai juste rajouter dans generator.yml une nouvelle action
Code : Tout sélectionner
object_actions:
_edit: { label: Editer }
showInfos: { label: Infos , action: showInfos }
ainsi que mon actions dans actions.class.php
Code : Tout sélectionner
public function executeShowInfos (sfWebRequest $request)
{
$this->hardware = $this->getRoute()->getObject();
$this->setTemplate('showInfos');
}
l'url generé dans mon cache est de la forme suivante
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>
puis j'ai ce message dans les logs
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
bonjour a tous j'ai pratiquement le même problème,
[code]404 | Not Found | sfError404Exception
Action "general/action" does not exist.[/code]
j'ai cette URL
[code]http://localhost/monprojet/web/frontend_dev.php/general/showInfos/action?id_hardware=2[/code]
au lieu de celle ci qui marche trés bien pour exécuter mon action
[code]http://localhost/monprojet/web/frontend_dev.php/general/2/showInfos[/code]
dois je modifier mon routing.yml? il est par defaut pour le moment
j'ai juste rajouter dans generator.yml une nouvelle action
[code] object_actions:
_edit: { label: Editer }
showInfos: { label: Infos , action: showInfos } [/code]
ainsi que mon actions dans actions.class.php
[code] public function executeShowInfos (sfWebRequest $request)
{
$this->hardware = $this->getRoute()->getObject();
$this->setTemplate('showInfos');
}[/code]
l'url generé dans mon cache est de la forme suivante
[code] <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]
puis j'ai ce message dans les logs
[code]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',)[/code]
merci pour votre aide