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.
Problem/Motivation
Similar to #2769289: Can't show 'revision author' on views of type 'Content' there's currently no way to do the same for Media.
Proposed resolution
The same approach as the issue linked above?
Comment | File | Size | Author |
---|---|---|---|
#6 | 3113986-6.patch | 16.61 KB | msuthars |
#2 | 3113986-2.patch | 1.07 KB | acbramley |
Comments
Comment #2
acbramley CreditAttribution: acbramley at PreviousNext commentedThis does the trick, posting early and will work on tests later.
Comment #3
mrshowermanI applied #2 and it does exactly what I need.
Comment #5
msutharsComment #6
msutharsRe-roll the patch to Drupal 9 also create testcase for it.
Comment #7
msutharsComment #8
jungle@msuthars, thanks for rerolling #27.
Quoting IS from #3131126: Can't show 'revision author' on Block content views, I do believe that it should be handled in
\Drupal\views\EntityViewsData::getViewsData()
too, the same approach was accepted in #2769289: Can't show 'revision author' on views of type 'Content', Needs followup was tagged on #3131126 for seeking a general approach, so do not tag Needs followup here.A manual testing would be good, but it's optional 1) Testing is green, 2) No test only patch, but I did reverted the change to core/modules/media/src/MediaViewsData.php, RevisionUserTest RED as expected on my local. 2) The key change is just 5 lines, which is almost the same with the key change in #2769289. So setting to RTBC.
Thanks!
Comment #9
jungleComment #10
alexpottCommitted and pushed b66f4f1923 to 9.1.x and 18623b27c1 to 9.0.x. Thanks!
Comment #13
msutharsI was very excited that it would be my first commit in the Drupal core. Better luck next time.
Comment #14
acbramley CreditAttribution: acbramley at PreviousNext commented@msuthars you are attributed in the commit :)
Comment #16
kim.pepper