md-systems / redirect

DEPRECATED: Redirect moved back to drupal.org, use the official repository.
https://www.drupal.org/project/redirect
21 stars 29 forks source link

Check access to the redirected page option cause Fatal rerror #73

Closed flocondetoile closed 8 years ago

flocondetoile commented 8 years ago

Hi,

I'm testing the latest dev version of redirect module.

If I check in the settings the option "Check access to the redirected page", and then if you try to go to any page on url of type /node/x, then you've got a fatal error. See below.

The website encountered an unexpected error. Please try again later. Recoverable fatal error: Argument 1 passed to Drupal\Core\Access\AccessManager::check() must implement interface Drupal\Core\Routing\RouteMatchInterface, instance of Symfony\Component\Routing\Route given, called in /srv/www/flocon2016/modules/redirect/src/RedirectChecker.php on line 72 and defined in Drupal\Core\Access\AccessManager->check() (line 123 of core/lib/Drupal/Core/Access/AccessManager.php). Drupal\Core\Access\AccessManager->check(Object, Object, Object) Drupal\redirect\RedirectChecker->canRedirect(Object, 'entity.node.canonical') Drupal\redirect\EventSubscriber\RedirectRequestSubscriber->setResponse(Object, Object) Drupal\redirect\EventSubscriber\RedirectRequestSubscriber->redirectNormalizeAliases(Object, 'kernel.request', Object) Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) Stack\StackedHttpKernel->handle(Object, 1, 1) Drupal\Core\DrupalKernel->handle(Object)

juampynr commented 8 years ago

I can't reproduce this issue. I even tried checking out previous releases in both 8.1.x and 8.0.x branches.

Berdir commented 8 years ago

I merged https://github.com/md-systems/redirect/pull/82, this should have been fixed? If you still get an error, then it has to be a different one. We don't even call this method anymore.