I'm getting an error when using this entity field query, the error says that that the field title cannot be found but I'm only querying the basic node table.

$product_query->entityCondition('entity_type', 'node')->entityCondition('bundle', 'product')->fieldCondition('field_line', 'tid', $selected)->fieldOrderBy('title', 'DESC');

2 Answers 2


The node title is a property, not a field:

  ->entityCondition('entity_type', 'node')
  ->entityCondition('bundle', 'product')
  ->fieldCondition('field_line', 'tid', $selected)
  ->propertyOrderBy('title', 'DESC');
  • Unless you're using Entity Translation and the Title module. In that case, to get the localized title, you should use: ->fieldOrderBy('title_field', 'value', 'ASC')
    – colan
    Commented Jul 21, 2015 at 19:53
                $queryst = new EntityFieldQuery();
                $queryst->propertyCondition('status', 1);   
                $queryst->fieldOrderBy('field_sort_order', 'value', 'ASC');
                $result_st = $queryst->execute();

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.