I am getting the following error from the module, initially I thought it was a permissions issue as all the permissions for this module were disabled, I have enabled all the permissions and the error still persists.

Error: Call to undefined method Drupal\media_revisions_ui\Access\MediaRevisionAccessCheck::countDefaultLanguageRevisions() in Drupal\media_revisions_ui\Access\MediaRevisionAccessCheck->checkAccess() (line 101 of /web/modules/contrib/media_revisions_ui/src/Access/MediaRevisionAccessCheck.php)

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Keoal created an issue. See original summary.

batigolix’s picture

The missing method was dropped in this issue #3117019: Incompatible with JSONAPI

batigolix’s picture

StatusFileSize
new1004 bytes

Unsure if there is a problem in putting this method back into the class, but here is a patch that does that, so that editing media becomes possible.

batigolix’s picture

Status: Active » Needs review
gombi’s picture

StatusFileSize
new1.01 KB
new652 bytes

Hi, I was able to reproduce the issue on Drupal 9.3.x, where ::countDefaultLanguageRevisions() was removed from Drupal\media\Access\MediaRevisionAccessCheck.

I can confirm that @batigolix's patch from #3 resolves the issue. I would just suggest adding an accessCheck(FALSE) (it's the default only since 9.2.x - https://www.drupal.org/node/3201242), in order to maintain backward compatibility.

chrissnyder’s picture

Status: Needs review » Reviewed & tested by the community

Patch #5 resolved the issue for me with Drupal 9.3

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 5: 3257781-restore-method-5.patch, failed testing. View results

bcizej’s picture

Status: Needs work » Closed (outdated)

Thanks both for your work on this. Tests are failing due to changes in access implementation in D9.3. I've added a new 2.1 RC release that is compatible with the new implementation in 9.3, so I'm closing this.

ChesterDrupal made their first commit to this issue’s fork.

savkaviktor16@gmail.com’s picture

StatusFileSize
new994 bytes

re-rolled
upd. sorry, uploaded by mistake