[TYPO3-mvc] updateAction throw an exception
Daniel Lorenz
mailinglists at capsicumnet.de
Wed Jan 12 21:09:01 CET 2011
Hi Franz,
Am Mittwoch, den 12.01.2011, 12:49 +0100 schrieb Franz Koch:
> Hey,
>
> > 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.
>
> this is due to a missing uid in the passed object - but you already
> figured that.
>
> ...
> > In my view I have a form like this:
> >
> > --- begin edit.html ---
> > <f:form method="post" action="update" name="user" object="{user}">
> ...
> > </form>
> > --- end edit.html ---
> >
> > When I sending the form the firebug shows me, that
> >
> > --- begin ---
> > tx_foobar_pi1[__hmac] ...
> ...
> > tx_foobar_pi1[user][__i... 14
> > ...
> > --- end ---
>
> So the __identity value (uid) of the user is submitted, right?
Yes, the firebug shows the posted data as a sting (I replaced %5B %5D
with [ ] for reading and shorten the __hmac for you)
tx_foobar_pi1[user][__identity]=17&tx_foobar_pi1[__referrer][extensionName]=foobar&tx_foobar_pi1[__referrer][controllerName]=User&tx_foobar_pi1[__referrer][actionName]=edit&tx_foobar_pi1[__hmac]= ... &tx_foobar_pi1[user][acceptagb]=&tx_foobar_pi1[user][acceptagb]=1&=Edit
> > The update function looks like this:
> ...
> > Before calling update($user) I var_dump the $user-getUid(), but this is
> > NULL.
> >
> > What do I wrong?
>
> from what you wrote everything seems to be correct. Have you checked if
> all other properties are correctly mapped to the incoming user object?
> Maybe you have a typo in one of the property names and thus extbase is
> not able to process the object correctly.
> Another possibility could be that extbase is not able to find the object
> in the defined storagePid - could that be the reason?
>
The form in FE is correctly filled with the Data from the database, so I
think there is no typo. The storagePid and newRecordStoragePid are also
given.
Any other hint?
Thanks, Daniel
More information about the TYPO3-project-typo3v4mvc
mailing list