[Flow] Upgrade to Flow 2.0: changes in persistence?
Stephen Bungert
stephenbungert at yahoo.de
Mon Sep 2 15:38:44 CEST 2013
Hello Bastian,
so what is the best what is the best way of updating a "read count" of a
record?
Submit a POST form via javascript?
"Bastian Waidelich" <bastian at typo3.org> schrieb im Newsbeitrag
news:mailman.1.1378125889.8687.flow at lists.typo3.org...
> François Suter wrote:
>
> Hi François,
>
>> I'm currently using the \TYPO3\Fluid\ViewHelpers\Link\ActionViewHelper
>> to create my links. From your message I gather that this is wrong.
>
> It's not exactly *wrong*, but GET requests should not alter data on the
> server side according to the HTTP spec and that's a very good advise to
> follow, as crawlers are also assuming that they can follow all links if
> you don't tell them otherwise (or lock them out behind some login form).
>
> And there are some more reasons, one of them being: If GET requests don't
> change anything they can be cached more easily.
>
> So there are three options I can think of:
>
> 1. Keep your Fluid as is and add
> $this->persistenceManager->persistAll()
> to the end of the respective action.
>
> 2. Turn the GET request into a POST request via unobtrusive JavaScript
> If 3. is not an option for you let me know, I can give you a concrete
> example
>
> 3. (prefered): Turn your link into a form
>
> From:
> <f:link.action action="update" arguments="{object:
> object}">update</f:link.action>
>
> To:
> <f:form action="update" object="{object}" objectName="object">
> <f:form.button>update</f:form.button>
> </f:form>
>
>
> With CSS you should be able to style the button any way you like (at least
> for recent browser versions)
>
> HTH
>
>
> --
> Bastian Waidelich
> --
> Core Developer Team
>
> TYPO3 .... inspiring people to share!
> Get involved: typo3.org
More information about the Flow
mailing list