Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Nov 2012 at 10:00 UTC
Updated:
29 Jul 2014 at 21:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerAdditional to hook_views_data_alter the field module integration also has hook_field_views_data.
Comment #3
dawehner#1: drupal-1834184-1.patch queued for re-testing.
Comment #5
dawehner#1: drupal-1834184-1.patch queued for re-testing.
Comment #6
berdirMakes sense and patch is simple enough. RTBC.
Comment #7
berdirHm. Setting back to needs review.
Looks like we have implementations for all three hooks in core, Do they all work because they implement a defined hook in their .views.inc that is loaded? Sounds like we need some sort of test coverage here.
Also, the naming of hook_field_views_data_alter() and the *callback* {$field_module}_field_views_data_views_data_alter() executed within an implementation of the alter hook by field.module itself is *really* weird. Is there an issue to come up with something better? Do we actually need this? What exactly is the advantage of doing that as opposed to implement a normal alter hook combined with a helper function or so? Also not sure how it's related to this problem, would we also need to make sure that we load the views.inc file here?
Comment #8
dawehnerAs told in IRC they all currently sometimes work just because most implementations actually implements hook_views_data, which
forces the .views.inc to load.
Created a follow-up for the other point mentioned: #1843490: Consider to document/remove {$field_module}_field_views_data_views_data_alter()"
Comment #9
yesct commented#1833296: Unable to alter views data is postponed and waiting on this issue.
perhaps since @dawehner opened the follow-up, this is back to rtbc now.
Comment #10
xjmActually I think we still need that test coverage.
Comment #11
tim.plunkettThis is blocking a major, so it is also major.
Comment #12
dawehnerWhat about a test like that?
Comment #13
berdirLooks good to me, can we have a test-only patch? :)
Comment #15
dawehner#12: drupal-1834184-12.patch queued for re-testing.
Comment #16
dawehnerSure!
Comment #18
dawehner#12: drupal-1834184-12.patch queued for re-testing.
Comment #19
dawehner#12: drupal-1834184-12.patch queued for re-testing.
Comment #20
berdir#12 does not apply anymore.
Comment #21
dawehnerRerolled.
Comment #23
dawehnerFix the tests.
Comment #24
dawehner.
Comment #26
dawehnerurgs.
Comment #27
dawehnerand the missing interdiff.
Comment #28
berdirThis looks good and has tests.
Comment #29
catchThe output of these two is cached so makes sense to put in an include. Committed/pushed to 8.x.