Problem/Motivation
#3600574: Use Drupal core RevisionHtmlRouteProvider causes "Access denied" on log revisions, and doesn't allow them to be reverted.
This is because the Entity API module provided revision route access checking, but Drupal core does not. We need to roll our own. We also need to define the revision-revert form class in the entity definition, otherwise the following error appears when you try to revert a revision:
Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\InvalidPluginDefinitionException: "The "log" entity type did not specify a "revision-revert" form class."
Proposed resolution
We already provide "view all log revisions" and "revert all log revisions" permissions. We just need to implement hook_entity_access() and check that the user has the appropriate permission.
We also need to define the revision-revert form class in the log entity definition. Core provides a class for this that we can use.
Remaining tasks
Do it.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork log-3601012
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
Comment #3
m.stentaComment #5
m.stentaMerged and released in 4.0.2.