Hi everyone,

I'm currently running into an issue regarding the development of a custom 
action in the list view in the backend part of my application.
Here is my generator.yml file :
    config:
      actions: ~
      fields:
        description: { label: "Nom" }
        address:    { label: "Addresse" }
      list:
        object_actions:
          _edit: { label: Editer }
          _delete: { label: Supprimer }
        actions:
          new1: { label: Nouveau Type 1, action: new1 }
          new2: { label: Nouveau Type 2 }
          new3: { label: Nouveau Type 3 }

As you can see, I tried different parameters for the actions part.
Here is the actions.class.php :

class gatewaysActions extends autoGatewaysActions
{
        public function new1(sfWebRequest $request)
        {
                parent::executeNew($request);
                $this->gateway->type = 1;
        }
        
        public function executeListNew2(sfWebRequest $request)
        {
                parent::executeNew($request);
                $this->gateway->type = 2;
        }
        
        public function executeListNew3(sfWebRequest $request)
        {
                parent::executeNew($request);
                $this->gateway->type = 3;
        }
}

Now when I click on the link generated below the list, I get to this URL : 
http://localhost/backend_dev.php/gateways/new1/action for type 1 or 
http://localhost/backend_dev.php/gateways/ListNew2/action
And then I get this result :
error: code: 404 message: 'Action "gateways/action" does not exist.' debug: 
name: sfError404Exception message: 'Action "gateways/action" does not exist.' 
traces: - "at ()
in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfController.class.php line 
196 ...
        $this->dispatcher->notify(new sfEvent($this, 'application.log', 
array(sprintf('Action \"%s/%s\" does not exist', $moduleName, $actionName))));
\n
      }
\n
\n
      throw new sfError404Exception(sprintf('Action \"%s/%s\" does not exist.', 
$moduleName, $actionName));
\n
    }
\n
\n
    // create an instance of the action
" - "at sfController->forward('gateways', 'action')
in SF_ROOT_DIR/lib/vendor/symfony/lib/controller/sfFrontWebController.class.php 
line 48 ...
      }
\n
\n
      // make the first request
\n
      $this->forward($moduleName, $actionName);
\n
    }
\n
    catch (sfException $e)
\n
    {
" - "at sfFrontWebController->dispatch()
in SF_ROOT_DIR/lib/vendor/symfony/lib/util/sfContext.class.php line 170 ...
   */
\n
  public function dispatch()
\n
  {
\n
    $this->getController()->dispatch();
\n
  }
\n
\n
  /**
" - "at sfContext->dispatch()
in SF_ROOT_DIR/web/backend_dev.php line 13 ...
require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');
\n
\n
$configuration = ProjectConfiguration::getApplicationConfiguration('backend', 
'dev', true);
\n
sfContext::createInstance($configuration)->dispatch();
\n
\n\n
"


Do you have any idea of what I am doing wrong ?
Thanks.

Regards,

Hugo Briand.

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to