[TYPO3-mvc] unable to replace object in repository...
Florian Staudacher
florian_staudacher at yahoo.de
Thu Dec 9 11:45:15 CET 2010
Hello list!
I hope you can help me with a little problem:
I am currently writing a plugin using Typo3 4.4.4 and extbase/fluid 1.3.0beta2.
My problem is, that I am unable to update an object in the repository that is
getting posted by a form.
Adding an object via the same form works flawlessly...
Here is the action that I have in the controller:
/**
* edit an Address of the customer
* @param Tx_WhoozShop_Domain_Model_Address address
*/
public function updateAddressAction(Tx_WhoozShop_Domain_Model_Address
$address) {
if(isset($this->me)) {
$this->addressRepository =
t3lib_div::makeInstance('Tx_WhoozShop_Domain_Repository_AddressRepository');
$this->addressRepository->update($address);
$this->flashMessageContainer->add('Your Address was updated.');
return json_encode('OK');
}
return "You are not allowed to do this!";
}
The $address is a valid object of the type Tx_WhoozShop_Domain_Model_Address and
I can even look up the "old" object with
$this->addressRepository->findByUid(6);
but it doesn't get updated. In the Browser I receive the "OK" that gets
returned.
Also, when I visit the page with the plugin, I get the following message, if I
am not logged into the backend:
Fatal error: Call to a member function getSessionData() on a non-object in
..../t3lib/class.t3lib_flashmessagequeue.php on line 100
I assume that's due to the current beta status of extbase?
Let me know if you need more info.
Thanks!
Florian
More information about the TYPO3-project-typo3v4mvc
mailing list