Problem/Motivation
We are receiving following error when I enable a module in Drupal 10.1.2.
he website encountered an unexpected error. Please try again later.
InvalidArgumentException: The controller for URI "" is not callable. in Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition() (line 71 of core/lib/Drupal/Core/Controller/ControllerResolver.php).
Drupal\webform_revision_ui\Controller\RevisionController->revisionOverview()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 583)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 70)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
The problem is that original patch https://www.drupal.org/comment/14289157#comment-14289157 had the method called versionHistory() in the VersionHistoryController.
In the subsequent patch updates, this method got replaced by magic method from the same controller.
So, I think we should directly use the magic method in RevisionController class.
Steps to reproduce
Install the module in Drupal 10.1.2
Visit the webform revisions path admin/structure/webform/manage/test/revisions
You'll notice the mentioned errors.
Proposed resolution
Use the magic method since original method is removed.
Patch is attached
Remaining tasks
Needs review
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comments
Comment #2
mohit_aghera commentedComment #3
progga commentedWorks for me. Thanks a lot for the fix :)
Comment #4
joseph.olstadwe also hit this, thanks for the patch
Comment #5
joseph.olstadI've notified all of the maintainers. This fix works. We're using Drupal 10.1.8 with the latest tagged release of webform_revision_ui and requires this patch.
Comment #6
jibranCan we make the patch green?
Comment #7
joseph.olstad@jibran, HEAD tests are failing, there's no green available for this project.
Comment #8
joseph.olstad@jibran, making this project green would be a different issue. Also should enable gitlab ci.
Comment #9
joseph.olstadhttps://www.drupal.org/node/3249827/qa
Comment #10
joseph.olstadeasy to reproduce this issue, simply click on the revisions tab when using Drupal 10
Comment #11
smulvih2+1 for patch #2, the only way to get the Revisions tab working in D10.
Comment #12
neerajsinghpatch #2, works seamlessly and fixes the error at the revision tab.
Comment #13
joseph.olstadWe now require the config_revision fixes prior to this. I'm going to roll up 3380657 into the Drupal 11 compatibility MR.
#3451887: Automated Drupal 11 compatibility fixes for config_revision
Multiple fixes in 3451887 for config_revision which is required by this module.
Comment #14
joseph.olstadPostpone , I've put this fix into the Drupal 11 compatibility merge request.
#3435672: Automated Drupal 11 compatibility fixes for webform_revision_ui
Comment #15
jibranFixed in #3435672: Automated Drupal 11 compatibility fixes for webform_revision_ui and added credits there.