[Flow] Remove does not remove
Bastian Waidelich
bastian at typo3.org
Fri Nov 1 15:08:21 CET 2013
Axel Wüstemann wrote:
> I do it within a regulary deleteAction, so by my mind this is not a save
> request methode, or?
Don't confuse "HTTP method" (aka "HTTP verb") with a "PHP function" (aka
"method" of a class).
You can call your action "thisIsAVeryUnsafeAction()" and Flow still
won't know that it should automatically persist your changes.
Instead, Flow will automatically invoke
*PersistenceManager::persistAll()* after all unsafe *HTTP requests*.
GET requests are not meant to change the server state – thus a delete
link is invalid according to the HTTP specification and should be
replaced by a form with method="post" (or an ajax request with method =
"DELETE").
BTW: We did the same mistake in the Flow Quickstart[1] and should
update the documentation. But the TYPO3.Kickstart package has been fixed
already and if you follow the examples your code should work as expected.
[1]
http://docs.typo3.org/flow/TYPO3FlowDocumentation/Quickstart/Index.html#storing-objects
--
Bastian Waidelich
--
Core Developer Team
TYPO3 .... inspiring people to share!
Get involved: typo3.org
More information about the Flow
mailing list