- Issue created by @kasperg
- Assigned to praveen rani
- π©π°Denmark ras-ben Copenhagen
A (very ugly) work around, that i added in a custom updatehook:
$entity_type = 'eventinstance'; $field_storage_definition = BaseFieldDefinition::create('string') ->setName('title') ->setLabel(t('Mock-title field')) ->setDescription(t('This is a mock title field, unused and read only. It is required, for eventinstances to work with entity reference autocomplete fields.')) ->setReadOnly(TRUE) ->setRevisionable(FALSE); \Drupal::entityDefinitionUpdateManager() ->installFieldStorageDefinition('title', $entity_type, $entity_type, $field_storage_definition); return "Mock title field has been added to the $entity_type entity.";
- Issue was unassigned.
- πΊπΈUnited States owenbush Denver, CO
Yea this is a problem. There's a core issue around computed fields in entity queries: π Handle computed fields in entity queries: throwing a helpful exception is better than a PHP fatal error Needs work but the solution there is to just throw and handle an exception, that won't make this work.
The workaround above worries me because I feel like it could break inheritance completely in certain circumstances. I may have to think on this one, maybe even to the point of creating a custom event instance reference field so we can control things better.