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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs work
Issue tags: +Needs tests
FileSize
1.07 KB

This does the trick, posting early and will work on tests later.

mrshowerman’s picture

I applied #2 and it does exactly what I need.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

msuthars’s picture

Assigned: Unassigned » msuthars
msuthars’s picture

Re-roll the patch to Drupal 9 also create testcase for it.

msuthars’s picture

Assigned: msuthars » Unassigned
Status: Needs work » Needs review
jungle’s picture

@msuthars, thanks for rerolling #27.

The same approach as the issue linked above? This really feels like it should be in the generic EntityViewsData handler though.

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!

jungle’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Version: 9.1.x-dev » 9.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed b66f4f1923 to 9.1.x and 18623b27c1 to 9.0.x. Thanks!

  • alexpott committed b66f4f1 on 9.1.x
    Issue #3113986 by acbramley, msuthars: Can't show 'revision author' on...

  • alexpott committed 18623b2 on 9.0.x
    Issue #3113986 by acbramley, msuthars: Can't show 'revision author' on...
msuthars’s picture

I was very excited that it would be my first commit in the Drupal core. Better luck next time.

acbramley’s picture

@msuthars you are attributed in the commit :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

kim.pepper’s picture

Issue tags: +#pnx-sprint