0

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?

1
  • I believe typed data can cause circular references via the parent property.
    – mradcliffe
    Commented May 4, 2016 at 11:38

1 Answer 1

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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