I have a content type with a Taxonomy term which has fields. When I try and load a node (or possibly nodes) of this type I get unexpected results. While debugging with kint() and var_export() I get errors about "circular references". Is this normal in Drupal 8 node structures?

Or is there an underlying misconfig in the content type or taxonomy causing this problem?

  • I believe typed data can cause circular references via the parent property. – mradcliffe May 4 '16 at 11:38

Yes, this is normal and by design.

When you want to dump it, just use $node->toArray(). Then you get an array with the plain values. You can use those field names and properties again to access the values on the node object, e.g. $node->yourfield->value.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.