eZ Community » Forums » eZ Publish 5 Platform » Recursive callback in legacy kernel...

Recursive callback in legacy kernel error when using runcallback from symfony

Recursive callback in legacy kernel error when using runcallback from symfony

Tuesday 12 May 2015 7:29:51 pm - 3 replies


I have a site with a custom login handler which has a legacy callback to set the user:


This was working great until I applied the patches for 5.4.2. Since then when the user logs in the error occurs:

Trying to run recursive callback in legacy kernel! Inception!

in vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Legacy/Kernel.php at line 148 

  1.     {
  2.         if ( $this->runningCallback )
  3.         {
  4.             throw new RuntimeException( 'Trying to run recursive callback in legacy kernel! Inception!' );
  5.         }
  6.         $this->runningCallback = true;

It seems this line:


\eZUser::setCurrentlyLoggedInUser( \eZUser::fetch( $userId ), $userId );

causes runcallback to run recursively 4 times before it happens:

Any idea what could be happening here?


Modified on Wednesday 13 May 2015 12:08:14 pm by Mark Blackmore

Wednesday 13 May 2015 12:40:10 pm

Hi Mark,

You can use the setCurrentUser Repository method:


Thursday 14 May 2015 4:30:39 pm

$repository->setCurrentUser($user); won't persist the change, but afaik the login code should take care about this for you, so maybe that is causing the recursion.?

Thursday 14 May 2015 5:16:58 pm

Thanks for the replies.

I have seperate table with >10,000 usernames but they all have one shared ez user account.

We created a user provider class to replace the ez user provider to load suers from the table and then use the event listener to set the ez user in legacy.

I'll continue to see if I can authenticate them without the legacy callback.

EDIT: I fixed this by using the original onInteractiveLogin method from here: https://doc.ez.no/display/EZP/How+to+authenticate+a+user+with+multiple+user+providers

Many thanks

Modified on Friday 15 May 2015 1:38:18 pm by Mark Blackmore


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from