[Flow] Persistence problems after implementing an image field with TYPO3.Media

Felix Rupp felix.rupp at gmail.com
Tue Aug 13 17:13:47 CEST 2013


Hi Christian,

thank you for this hint! You are my hero! 

I'm still fixing my errors, but it seems to work with manually persisting the changes. Do you have a personal recommendation for deleting objects from the database? Should this be done by using a POST-request or is manually triggering the persistAll() a common workflow?


Thank your very much!


Best regards,

Felix


> The thing is, that the persistence wont be triggered during GET requests.
> 
> You need to inject the persistance manager and call persistAll to perist 
> you data in a GET request.
> 
> Here a piece from the Flow Documentation:
> 
> 
>       Safe request methods are read-only
> 
> According to the HTTP 1.1 specification, so called "safe request 
> methods" (usually GET or HEAD requests) should not change your data on 
> the server side and should be considered read-only. If you need to add, 
> modify or remove data, you should use the respective request methods 
> (POST, PUT, DELETE and PATCH).
> 
> Flow supports this principle because it helps making your application 
> more secure and perform better. In practice that means for any Flow 
> application: if the current request is a "safe request method", the 
> persistence framework will NOT trigger persistAll() at the end of the 
> script run.
> 
> If you need to store some data during a safe request (for example, 
> logging some data for your analytics), you are still free to call 
> PersistenceManager->persistAll() manually.


More information about the Flow mailing list