🇮🇹Italy MarcoPBazz
An example of how to declare the field to Views in hook_views_data(), from my comment on #2981047: Allow adding computed bundle fields in Views:
It's working form me (Drupal 9.5x + computed 4.0.0-alpha2) as I can show my computed field, but if I try to filter but I get "missing or broken handler for this element" as message.
Here's my code in my .views.inc file
function mymodule_views_data_alter(&$data) {
$data['node_field_data']['myfield'] = [
'title' => 'Myfield title',
'entity field' => 'myfield',
'field' => [
'id' => 'field',
],
'filter' => [
'title' => t('Myfield title'),
'field' => 'id',
'id' => 'myfield',
],
];
}
What am I missing?
🐛 | Registration types | Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 114688 bytes)
🇮🇹Italy MarcoPBazz
Same problem here, but it seems related to this issue: https://www.drupal.org/project/registration_types/issues/3308383 →
Patch #4 solved in my case