- Issue created by @arousseau
- 🇮🇳India Ishani Patel
Hello,
I've followed the steps and am facing the same issue. - 🇯🇵Japan ptmkenny
Thanks for reporting this.
The BaseFieldDefinition::create($type) is this one in SettingsForm.php?
foreach ($field_types as $name => $field_type) { // Special handling for preconfigured definitions. // @see \Drupal\Core\Field\FieldTypePluginManager::getUiDefinitions() $type = str_starts_with($name, 'field_ui:') ? $field_type['id'] : $name; $field_definition = BaseFieldDefinition::create($type);
We could probably follow the comment here and do something closer to what getUiDefinitions does in FieldTypePluginManager:
/** * {@inheritdoc} */ public function getUiDefinitions() { $definitions = $this->getDefinitions(); // Filter out definitions that can not be configured in Field UI. $definitions = array_filter($definitions, function ($definition) { return empty($definition['no_ui']); }); // Add preconfigured definitions. foreach ($definitions as $id => $definition) { if (is_subclass_of($definition['class'], '\Drupal\Core\Field\PreconfiguredFieldUiOptionsInterface')) { foreach ($this->getPreconfiguredOptions($definition['id']) as $key => $option) { $definitions["field_ui:$id:$key"] = array_intersect_key( $option, ['label' => 0, 'category' => 1, 'weight' => 1, 'description' => 0] ) + $definition; } } } return $definitions; }
Also, I have documented that this module is not compatible with Data Field on the project page.