Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It's a Views error, but I think it's related to ER. I know how to reproduce, but I can seem to solve yet :/
1) Attach a field to node
2) Attach same field to an entity without revisions (I did it on a message entity)
In Views I get
Notice: Undefined index: revision table in field_views_field_default_views_data() (line 182 of sites/all/modules/views/modules/field.views.inc).
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedWe don't do anything special around this. We just call the Views function passing it the unaltered field array.
Comment #2
amitaibuOk, I think it's a Views issue. The field I'm attaching is Entity reference. I see it's erroring somewhere in
Comment #3
amitaibuWhat I think that happens, is that this field has a revision on node, and Views assumes it has revision on all other entities as-well.
This results in the end with an Exception:
in views_plugin_query_default->execute() (line 1354 of /Applications/MAMP/htdocs/hv7/sites/all/modules/views/plugins/views_plugin_query_default.inc).
Comment #4
dawehnerThis kind of errors happened before if you had the same field on two entites which aren't connected via relationships but via direct/automatic joins. Once you have this situation it's impossible to decide on which entity type your field actually is so probably the "wrong" one is chosen here, but this issue doesn't have that problem.
I tryed node and user with a normal textfield and it worked as expected
This line number seems a bit out of date, what's the used line number if you use the current version of views?
Comment #5
amitaibu> This line number seems a bit out of date, what's the used line number if you use the current version of views?
Might have copied it form older Views, but I've of-course tested on Dev as-well. My solution in the end was to attach a different field-name to the non-revisioned entity, and indeed it's hard for Views to know what's right.
> I tryed node and user with a normal textfield and it worked as expected
Oh, you mean it worked ok?
Comment #6
dawehnerYes it worked for node + user without the notice. Maybe i should try messaging the next day.