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

Christian Loock chl at vkf-renzel.de
Tue Aug 13 16:04:23 CEST 2013


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.



Am 13.08.2013 15:35, schrieb Felix Rupp:
> Hi Christian,
>
> I'm running the current dev-master of the flow-base-distribution, packagist reference: 0346b3e, 2013-08-09 12:49 UTC and the TYPO3.Media dev-master package with the reference: 14361b5, 2013-08-09 13:35 UTC.
>
> I am generally aware of the „Safe Request“ feature/problem, but in all the mentioned cases I use regular GET-requests. There is no POST involved which would need a special CSRF-token. Am I wrong with this? Do I need the CSRF-token in all requests? Then why do I have to put it in manually? Apart from the one ajax-based request, all other requests are normal http-requests, built with the f:uri.action viewhelper.
>
>
> Thank you for the quick response!
>
>
> Greetings,
>
> Felix
>
>
>
>> Hey Felix,
>>
>> This actually sounds a bit like another problem unrelated to images, but
>> I don't know. Which version of Flow are you running? Are you aware of
>> "Safe Requests" if you are running 2.0 or master? This could totally
>> explain the missing behavior and errors.
>>
>> If it is not that I am rather puzzled but I will think about it.
>>
>> Cheers,
>> Christian
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow



More information about the Flow mailing list