Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 294878

Views throws exception when using entity_field_storage_info

$
0
0

Problem/Motivation

The views module throws an exception when a entity type was modified using the entity_field_storage_info hook.

The exception is raised in EntityViewsData::mapFieldDefinition() around line 295. It's caused by a loop in EntityViewsData::getViewsData() around line 218. The method scans all fields returned by a table mapping and relies on all fields being registered through EntityManager::getBaseFieldDefinitions(). However, if you manipulate the fields using the hook entity_field_storage_info, those fields won't show up within the base field definitions.

Proposed resolution

The easiest solution would be to add a check of whether a field is available within the base field array. I've included a path that does right that.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 294878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>