Hello, I'm new in working with symfony and I have some questions to ask. 1. I'm trying to use forms in frontend and I want some of fields in form to be displayed disabled aka not for editing. 2. I use admin generator to generate admin panel for one table and when I try to add new row I get error message: [sfError404Exception] This request has been forwarded to a 404 error page by the action "servers/edit". stack trace
- at **() in *SF_SYMFONY_LIB_DIR\action\sfAction.class.php* line 89 ...<http://127.0.0.1:8008/admin_dev.php/servers/save#> 1. { 2. if (!$condition) 3. { 4. throw new sfError404Exception($this->get404Message( $message)); 5. } 6. } I hunt the problem and I fount this: /cache/admin/dev/modules/XXX/actions/actions.class.php row :72 : $this->servers = $this->getServersOrCreate(); must be $this->servers = $this->getServersOrCreate(''); And form works now ... but I don't understand why it is generated like this. The function getServersOrCreate() has this source: protected function getServersOrCreate($server_id = 'server_id') { if ($this->getRequestParameter($server_id) === '' || $this->getRequestParameter($server_id) === null) { $servers = new Servers(); } else { $servers = ServersPeer::retrieveByPk($this->getRequestParameter($server_id)); $this->forward404Unless($servers); } return $servers; } As I see it waits for $server_id and if it is not set $server_id has "server_id" and this leads to else of the "if" condition. And that's why I make the above patch to calling of the function.... but my patch is temporary until next "symfony cc". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
