1

I noticed that on some of my TYPO3 7.6 extensions an action seems to get called twice, for example a listAction. If I put a vardump or an echo there it gets outputted twice, however the template is shown correctly once. I cannot discover any error in the code. The weird thing is on another site it does not happen with the same extension.

What could be the reason for this and how can I debug this?

4 Answers4

6

Maybe you are using page.10.variables? Check my answer here what is the best usage of typoscript in fluid templates?

Community
  • 1
  • 1
Georg Ringer
  • 7,779
  • 1
  • 16
  • 34
  • 2
    Indeed I found out that in my general site templating setup I used two page.10.variables which looked at .select.where = colPos = 1 Even when the 2nd variable is not in the page template they seem to cause to run things twice. – Jacco van der Post Jan 09 '17 at 09:48
  • 1
    I had a similar problem and this answer and the one you linked to helped me to solve it. Thank you very much! – Sybille Peters Feb 22 '18 at 23:05
1

For me non-cacheable action in ext_localconf.php solved the problem

    // non-cacheable actions
    array(
        'ControllerName' => 'list, show, create, update',
        
    )
UnpassableWizard
  • 1,237
  • 11
  • 20
0

Maybe the plugin is inserted twice on that page? Create a new plugin on another page and see if theres a double debug, too.

Paul Beck
  • 2,675
  • 1
  • 12
  • 14
0

I noticed something similar when using fluidTYPO3. The cause was that the configuration-section of the fluid-template had to be parsed and executed to build the flexform structure to read and write the flexform-data. So the template might be parsed and executed twice but the php action is only called once. You can test this by dumping some variable in your action with: \TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($data, __FILE__.':L'.__LINE__);

Benjamin
  • 961
  • 1
  • 11
  • 23