[TYPO3-mvc] Action runs several times according to the amount of same plugins

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Mar 11 10:38:20 CET 2011


Hey Markus,

> In my controller I have two actions, one for showing the banners in the plugins - that is working very fine - and one action for the counting of clicks and the redirect after someone has made a click on a banner. The counting action is called by a<f:link.action>  link in the fluid template.
>
> Unfortunately the counting action is running several times, according to the number of banner plugins on the website. This means every run leads to an increment of the banner click counter. So I have tried to work dirty with an "exit;" statement to limit the runs of the action to a single time, but this doesn't work properly because the
> update of the banner object at the according repository seems to be made at the last of the several runs of the action.

that's not a particular Extbase problem - you would have this issue also 
with pi-based plugins. All you have to do is to bind the tracking action 
to either a specific plugin instance (e.g. by also passing the uid of 
the CE in the links and let only the plugin instance with the according 
uid process the request) or use a eID script or a special pageType to 
track the clicks.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list