We have a content type in which we have a entityreference field for a taxonomy field. In the entity reference field We are using A field attached to this entity as sort by field.

When we submit the node form we get a Fatal error: Call to a member function conditions() on null in /Applications/MAMP/htdocs/cdb/docroot/modules/node/node.module on line 3462.

error

Proposed Solution:
I fixed it temporarily by adding a extra condition check in node core module.

Fix if ($type == 'entity' && is_object($subquery) && count($subquery->conditions())) line 3462.

But I am not sure if the fix should belong to core node module or to entityreference module since taxonomy reference field is a plugin declared by entityreference module, and ideally call flow in node module should have early returned before the statement throwing error.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

itdevshri created an issue. See original summary.

itdevshri’s picture

Issue summary: View changes
FileSize
236.51 KB