diff --git a/src/FieldAttributeConverter.php b/src/FieldAttributeConverter.php index ff65cc05..8d5c0c2a 100644 --- a/src/FieldAttributeConverter.php +++ b/src/FieldAttributeConverter.php @@ -82,7 +82,11 @@ public function __construct(EntityFieldManagerInterface $entity_field_manager, F * Prefix of the field. */ protected function getFieldPrefix(): string { - return (string) $this->config->get('field_ui.settings')->get('field_prefix'); + // If the Field UI module is installed, and has a specific prefix + // configured, use that. Otherwise, just default to using 'field_' as + // a prefix, which is the default that Field UI ships with. + $prefix = $this->config->get('field_ui.settings')->get('field_prefix') !== NULL ? $this->config->get('field_ui.settings')->get('field_prefix') : 'field_'; + return (string) $prefix; } /**