i have a really strange problem..

if I visit
http://localhost/dianadobreva/anfore/edit/31
it's all okay, but if i complete the form and submit it, the same url
gives me 404 and a blank page.. I tried to set debug =2 but doesn't
give me no errors, it only shows me the query..

my controller action code($this->Singular contains the name of the
model... Anfora ):

        function edit($id = null) {
                if (!$id && empty($this->data)) {
                        $this->flash(__('Invalid Id', true), 
array('action'=>'index'));
                }
                if (empty($this->data)) {
            $siti = $this->{$this->Singular}->Scavo->Sito->find('list');
            $epigrafia1 = $this->{$this->Singular}->Epigrafia1->find('list');
            $epigrafia2 = $this->{$this->Singular}->Epigrafia2->find('list');
            $this->set(compact('siti','epigrafia1','epigrafia2'));
                        $this->data = $this->{$this->Singular}->read(null, $id);
            $this->render('edit', 'default', '/materiali/edit');
        } else {
        echo "sticazzi!!!!";
            if ($this->{$this->Singular}->saveAll($this->data)) {
                $this->data['Disegno'][$this->singular.'_id'] =
$this->{$this->Singular}->id;
                $this->{$this->Singular}->Disegno->save($this->data);
                $this->data['Immagine'][$this->singular.'_id'] =
$this->{$this->Singular}->id;
                $this->{$this->Singular}->Immagine->save($this->data);
                $this->flash(__('Salvataggio avvenuto.', true),
array('action'=>'index'));
            } else {
                $this->flash(__('Salvataggio fallito.', true),
array('action'=>'index'));
            }
        }
}


thank you

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to