Problem/Motivation

The following error is thrown on the revert page.

Error: Call to a member function id() on null in Drupal\media_revisions_ui\Access\MediaRevisionAccessCheck->access() (line 41 of modules/contrib/media_revisions_ui/src/Access/MediaRevisionAccessCheck.php).

Proposed resolution

Fix and add tests.

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review
StatusFileSize
new1.76 KB
new1.08 KB

Here's the fix and the test only patch.

Status: Needs review » Needs work

The last submitted patch, 2: 3119272-2-test-only.patch, failed testing. View results

acbramley’s picture

Status: Needs work » Needs review
StatusFileSize
new1.76 KB

Weird that it didn't apply...looks like it was a bit fuzzy.

deaom’s picture

Status: Needs review » Reviewed & tested by the community

Hi @acbramley, I could reproduce the error and the patch did solve it. So now reverting is possible and works as designed (with the patch applied), without the patch the error just crashed the revisions. I tested it also with a different user and a role, with the right permissions set for the role, the revert is also working with the patch applied. So marking it as RTBC and thank you for the patch.

bcizej’s picture

Status: Reviewed & tested by the community » Fixed

Thank you both for patch and testing. Commited setting issue to fixed.

Status: Fixed » Closed (fixed)

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