- 🇬🇧United Kingdom kolin
In 3.x this error is fixed by: https://www.drupal.org/project/dynamic_entity_reference/issues/3057556 🐛 Implement EntityReferenceItemInterface Needs work
Notice: Undefined index: target_type in /var/www/drupalvm/drupal/web/modules/contrib/dynamic_entity_reference/dynamic_entity_reference.views.inc on line 148
PHP Notice: Undefined index: target_id in /var/www/drupalvm/drupal/web/modules/contrib/dynamic_entity_reference/dynamic_entity_reference.views.inc on line 14
7
I get 12 of these in my console whenever I clear my cache. My first thought is that it might be related to the fact that I am working on a computed dynamic entity reference field list that creates items and sets these values via the line:
$this->list[$index] = $this->createItem($index, [
'target_id' => $reference['referring_entity_id'],
'target_type' => $reference['referring_entity_type']
]);
I think this is because dynamic_entity_reference_views_data does not check if the dynamic entity reference field was computed or not. So it queries for a table column that does not exist.
Fixed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
In 3.x this error is fixed by: https://www.drupal.org/project/dynamic_entity_reference/issues/3057556 🐛 Implement EntityReferenceItemInterface Needs work