Error when updating to v4 and custom fields used as base field

Created on 30 August 2025, 3 months ago

Problem/Motivation

When a custom field is used as a base field, i.e. not through the Field UI, then the update hook custom_field_update_10001 fails because $field = FieldConfig::loadByName($entity_type_id, $bundle, $field_name); will return NULL.

So, that raises two issues:

  • This needs to be fixed so that this doesn't fail
  • Does this require a separate upgrade path for base fields?

As for the second issue, it looks like field storage doesn't change, it's only about field settings. In that case, we would only have to update the settings in the base field definition accordingly. Is that correct?

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024