Răsfoiți Sursa

This fix keeps non Tripal fields from being excluded on the display if they don't follow our rules. I'm committing to the 467-tv3-entity_relationships branch because it requires the update that is in that branch

Stephen Ficklin 6 ani în urmă
părinte
comite
0697ceba82
1 a modificat fișierele cu 4 adăugiri și 3 ștergeri
  1. 4 3
      tripal/includes/tripal.fields.inc

+ 4 - 3
tripal/includes/tripal.fields.inc

@@ -962,14 +962,15 @@ function tripal_field_is_empty($item, $field) {
     return TRUE;
   }
 
-  // If there is no value field then the field is empty.
-  if (!array_key_exists('value', $item)) {
+  // If the field is a tripal field storage API field and there 
+  // is no value field then the field is empty.
+  if (array_key_exists('tripal_storage_api', $field['storage']['settings']) and !array_key_exists('value', $item)) {
     return TRUE;
   }
 
   // If there is a value field but there's nothing in it, the the field is
   // empty.
-  if (array_key_exists('value', $item) and empty($item['value'])){
+  if (array_key_exists('value', $item) and empty($item['value'])) {
     return TRUE;
   }