[TYPO3-mvc] updateAction throw an exception
Daniel Lorenz
mailinglists at capsicumnet.de
Wed Jan 12 08:26:35 CET 2011
Hello guys,
I ran into a new problem with extbase and can't find a solution to solve
this.
I have an object and an edit view for this object. When I send the
filled form I see this exception:
#1249479819: The "modified object" is does not have an existing
counterpart in this repository.
Tx_Extbase_Persistence_Exception_UnknownObject thrown in file
/var/www/kompnet/cms/typo3conf/ext/extbase/Classes/Persistence/Repository.php in line 222.
I don't know, why this exception raises.
In my view I have a form like this:
--- begin edit.html ---
<f:form method="post" action="update" name="user" object="{user}">
<f:form.checkbox property="acceptagb" value="1"/><br />
...
<f:form.submit value="Edit" />
</form>
--- end edit.html ---
When I sending the form the firebug shows me, that
--- begin ---
tx_foobar_pi1[__hmac] ...
tx_foobar_pi1[__referre... edit
tx_foobar_pi1[__referre... User
tx_foobar_pi1[__referre... Foobar
tx_foobar_pi1[user][__i... 14
tx_foobar_pi1[user][acc...
tx_foobar_pi1[user][acc... 1
...
--- end ---
The update function looks like this:
--- begin ---
/**
* Updates an existing User and forwards to the index action
afterwards.
*
* @param Tx_Foobar_Domain_Model_User $user
*/
public function updateAction(Tx_Foobar_Domain_Model_User $user) {
$this->userRepository->update($user);
$this->flashMessageContainer->add('Your User was updated.');
$this->redirect('index');
}
--- end ---
Before calling update($user) I var_dump the $user-getUid(), but this is
NULL.
What do I wrong?
Thanks for any hint.
Daniel
More information about the TYPO3-project-typo3v4mvc
mailing list