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

Oberndörfer, Markus Markus.Oberndoerfer at rossmann.de
Fri Mar 11 10:05:01 CET 2011


To whom it may concern ...

At my actual project I am trying to create a banner extension with extbase and fluid. On the website are several different banners that can be presented by several plugins of the same kind.

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.

In a test I have reduced the code of the plugins (fluid-template) and the action to the absolute minimum, but the amount of runs remains dependend on the amount of identical plugins on the website. Is this behavior of the action intended as it is? Can someone give me a hint for a clean solution?

Best regards and wishes for a sunny weekend

Markus





More information about the TYPO3-project-typo3v4mvc mailing list