Solved by adding an or checking for an empty view.

   @@ -812,7 +812,7 @@ function _nodereference_potential_references($field, $string = '', $match = 'con
     }
     // If the view doesn't exist, we got FALSE, and fallback to the regular 'standard mode'.
 
-    if ($references === FALSE) {
+   if ($references === FALSE || empty($references)) {
       $references = _nodereference_potential_references_standard($field, $string, $match, $ids, $limit);
     }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

artkon’s picture

artkon’s picture

Fixed patch above, the nodereference was returning all nodes when the view return empty, for our use case the important thing was to pass validation when the site admin was saving the node, attached is patch for that.