Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By hairqles on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Since disabling modules that provide field types will still keep components in the system, the concept of the field's status (active/in_active) became unnecessary.
- The fields configuration YML files no longer declare an
'active:1'
property. - Function
field_rebuild()
andfield_modules_installed()
will clear field cache. - The methods
FieldStorageConfigStorage::loadByProperties()
andFieldConfigStorage::loadByProperties()
, will no longer use the property 'include_inactive' in $conditions argument. - The FieldStorageConfig class no longer has an
$active
public property. field_read_instances()
has been removed by #2018319: Remove field_read_field(s)() and field_read_instance(s) in favor of entity_load() and entity_load_multiple_by_properties()
Drupal 7
$params = array(
'entity_type' => $this->entityType,
'bundle' => $bundle,
);
$include_additional = array(
'include_deleted' => TRUE,
'include_inactive' => TRUE,
);
$instances = field_read_instances($params, $include_additional);
Drupal 8
$values = array(
'entity_type' => $this->entityTypeId,
'bundle' => $bundle,
'include_deleted' => TRUE,
);
$fields = entity_load_multiple_by_properties('field_config', $values);
Impacts:
Module developers