Update to 1.0.10 gives 'EntityRevisionViewController' error

Created on 26 October 2023, about 1 year ago
Updated 9 November 2023, about 1 year ago

I updated from 1.0.9 to 1.0.10 (using composer, then upload via sftp; D9.5.11, php 8.1.23). As soon as uploaded, clear cashes no longer possible ('unexpected error' white screen); updates.php same problem. Removed and reinstated 1.0.9 and errors gone.

The error.log says this:

Error: Class "Drupal\Core\Entity\Controller\EntityRevisionViewController" not found in include() (line 32 of /home/xxx/public_html/modules/contrib/media_alias_display/src/Controller/DisplayController.php)
#0 /home/xxx/public_html/vendor/composer/ClassLoader.php(576): include()
#1 /home/xxx/public_html/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}()
#2 [internal function]: Composer\Autoload\ClassLoader->loadClass()
#3 /home/xxx/public_html/core/lib/Drupal/Core/Entity/EntityResolverManager.php(135): ReflectionMethod->__construct()
#4 /home/xxx/public_html/core/lib/Drupal/Core/Entity/EntityResolverManager.php(221): Drupal\Core\Entity\EntityResolverManager->setParametersFromReflection()
#5 /home/xxx/public_html/core/lib/Drupal/Core/EventSubscriber/EntityRouteAlterSubscriber.php(48): Drupal\Core\Entity\EntityResolverManager->setRouteOptions()
#6 [internal function]: Drupal\Core\EventSubscriber\EntityRouteAlterSubscriber->onRoutingRouteAlterSetType()
#7 /home/xxx/public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#8 /home/xxx/public_html/core/lib/Drupal/Core/Routing/RouteBuilder.php(189): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#9 /home/xxx/public_html/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php(83): Drupal\Core\Routing\RouteBuilder->rebuild()
#10 /home/xxx/public_html/core/includes/common.inc(587): Drupal\Core\ProxyClass\Routing\RouteBuilder->rebuild()
#11 /home/xxx/public_html/core/modules/system/src/Controller/DbUpdateController.php(353): drupal_flush_all_caches()
#12 /home/xxx/public_html/core/modules/system/src/Controller/DbUpdateController.php(164): Drupal\system\Controller\DbUpdateController->selection()
#13 [internal function]: Drupal\system\Controller\DbUpdateController->handle()
#14 /home/xxx/public_html/core/lib/Drupal/Core/Update/UpdateKernel.php(115): call_user_func_array()
#15 /home/xxx/public_html/core/lib/Drupal/Core/Update/UpdateKernel.php(76): Drupal\Core\Update\UpdateKernel->handleRaw()
#16 /home/xxx/public_html/update.php(27): Drupal\Core\Update\UpdateKernel->handle()
#17 {main}
๐Ÿ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom xax London, UK

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @xax
  • Assigned to Shreya_98
  • First commit to issue fork.
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Waiting for branch to pass
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia shalini_jha

    hi @xax
    I have added a patch for the issues fixes.

  • Status changed to Active about 1 year ago
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom xax London, UK

    Thanks for your quick responses! I have implemented the patch, the errors do disappear and I can flush caches and run update.php.

    However, the media aliases now don't work as they should. Trying to access them using the alias (e.g. https://domain.tld/media/2562) gives a white screen, with the error/log reporting:

    TypeError: Drupal\Core\Entity\Controller\EntityViewController::__construct(): Argument #2 ($renderer) must be of type Drupal\Core\Render\RendererInterface, Drupal\Core\Entity\EntityRepository given, called in /home/xxx/public_html/modules/contrib/media_alias_display/src/Controller/DisplayController.php on line 113 in Drupal\Core\Entity\Controller\EntityViewController->__construct() (line 40 of /home/xxx/public_html/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php)
    #0 /home/xxx/public_html/modules/contrib/media_alias_display/src/Controller/DisplayController.php(113): Drupal\Core\Entity\Controller\EntityViewController->__construct()
    #1 /home/xxx/public_html/modules/contrib/media_alias_display/src/Controller/DisplayController.php(136): Drupal\media_alias_display\Controller\DisplayController->__construct()
    #2 /home/xxx/public_html/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\media_alias_display\Controller\DisplayController::create()
    #3 /home/xxx/public_html/core/lib/Drupal/Core/Controller/ControllerResolver.php(117): Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition()
    #4 /home/xxx/public_html/core/lib/Drupal/Core/Controller/ControllerResolver.php(69): Drupal\Core\Controller\ControllerResolver->createController()
    #5 /home/xxx/public_html/core/lib/Drupal/Core/Controller/ControllerResolver.php(85): Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition()
    #6 /home/xxx/public_html/vendor/symfony/http-kernel/HttpKernel.php(152): Drupal\Core\Controller\ControllerResolver->getController()
    #7 /home/xxx/public_html/vendor/symfony/http-kernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
    #8 /home/xxx/public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
    #9 /home/xxx/public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
    #10 /home/xxx/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
    #11 /home/xxx/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
    #12 /home/xxx/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
    #13 /home/xxx/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
    #14 /home/xxx/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
    #15 /home/xxx/public_html/core/lib/Drupal/Core/DrupalKernel.php(718): Stack\StackedHttpKernel->handle()
    #16 /home/xxx/public_html/index.php(19): Drupal\Core\DrupalKernel->handle()
    #17 {main}
  • ๐Ÿ‡ฆ๐Ÿ‡ฒArmenia le72 Yerevan ๐Ÿ‡ฆ๐Ÿ‡ฒ

    Getting the same Error after update to 1.0.10 :-(

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Acknowledging Iโ€™ve seen this ticket and am prioritizing getting a fix. Will try and work on it this evening.

  • Status changed to Needs review about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    This was my mistake when I merged โœจ Add Support for Media Revisions Fixed . I reverted that change as it will go into the D10 only version.

    Since this broke on D9 went ahead and did a release for 1.0.11 reverting that change.

    Then started a 2.0.x branch with โœจ Add Support for Media Revisions Fixed included.

    Hiding the patch because as noted it wasn't tested.

    Leaving open but @le72 or xax let me know if you still have the issue on D9

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave
  • ๐Ÿ‡ฆ๐Ÿ‡ฒArmenia le72 Yerevan ๐Ÿ‡ฆ๐Ÿ‡ฒ

    Donโ€™t see issues after upgrading to 1.0.11. Thank you.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave
  • Status changed to Fixed about 1 year ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom xax London, UK

    @smustgrave, 1.0.11 works fine, many thanks!

    FYI it does give this error in the /admin/reports/updates page:

    Not compatible
    Requires Drupal core: 10.0.0 to 10.1.6

    but as it works that'll just be the version declaration in the info file..

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

Production build 0.71.5 2024