Help needed for "Recursion detected" error



I am working on a new project and need your help because there is a problem I never had before in any Pimcore project. The Pimcore version is 5.3.1.

First a sketch of the document structure to give you a feeling about the environment.

  • Start
    – hotelname
    ---- en
    ------ the-hotel
    -------- cuisine
    -------- meetings-incentives

The following STR reproduce the problem on my installation:

  1. open the document “cuisine” and save the document.
  2. open the document “meetings-incentives”.

But after step 2 the following error occurs:

Status: 500 | Internal Server Error
URL: /admin/page/get-data-by-id
Message: Recursion detected

The weird thing is: after repeating step 2 there is no error, the document “meetings-incentives” opens.

So I tried opening admin/page/get-data-by-id?_dc=1533199212745&id=113 directly after saving a document (113 is the ID of the document of step 2). The same again: error on first try, no error on second try - as expected, but now I had more error details:

First try:

Second try:

The expected JSON output.

My next step was to hijacking the method object2array() in helper-functions.php

I changed the following line:

throw new \InvalidArgumentException(json_last_error_msg());


throw new \InvalidArgumentException($paj);

so that I was able to see the object which throw the error. Now I was able to compare the successful with the failed request.

The failed request had different start:

'success': false,
  'message': '',
  'trace': [
      'file': '/home/danubcbm/pimcore/lib/Pimcore/Bundle/AdminBundle/Controller/Admin/PageController.php',
      'line': 86,
      'function': 'object2array',
      'args': [

But within this “args” there was the content I was interested in. I compared this with the content of the successful request. And both were similar - with one exception!

Successful request:

'parentId': 111,
'parent': {
    'title': '…',
    'description': '…',
    'metaData': [
    'type': 'page',

and so on. And the failed reqest:

'parentId': 111,
'parent': null,

So maybe there is the culprit? But I don’t get it. In both cases Pimcore has the correct parentId. But Pimcore seems to fail to load the parent document?

I am really out of ideas so if someone has any hint it would be really appreciated!

Thank you!