Installed both 8.x-1.0-alpha1 and 8.x-1.0-dev and after that all page lead to a WSOD with this error

The website encountered an unexpected error. Please try again later.

inspecting the logs I see this

Message
UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 554 of /var/www/vhosts/domain.com/httpdocs/core/lib/Drupal/Core/Url.php).
Severity
Error

website is running latest 8.2.3 drupal version
and uninstalling it make the site work as normal again

Comments

GiorgosK created an issue. See original summary.

rondog469’s picture

This is happening on my end too. If I enable the module I get WSOD until I remove it. The error in my php_error.log is

[22-Nov-2016 15:52:35 America/Los_Angeles] Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'redirect_source__query' in 'order clause': SELECT rid FROM {redirect} WHERE hash IN (:hashes__0, :hashes__1) ORDER BY LENGTH(redirect_source__query) DESC; Array
(
    [:hashes__0] => VHxU0vPCJr-V1OSsizmK80UDhnQONLl7Tz053h3jS7o
    [:hashes__1] => bV7cMvyZ89yvlNLYL938O97yBXE9D8hRNF7i2MHxWVg
)
" at /Applications/MAMP/htdocs/nue/docroot/core/lib/Drupal/Core/Database/Connection.php line 671
pjcdawkins’s picture

I have the same problem as #2: there are references to DB columns like redirect_source__query and redirect_source__path throughout the code, but the redirect table only has columns like source and source_options.

pjcdawkins’s picture

Installed via: composer require drupal/redirect && drush en -y redirect
Version installed: 8.x-1.0-alpha1
Core version: 8.2.3

Error message:

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'redirect_source__query' in 'order clause': SELECT rid FROM {redirect} WHERE hash IN (:hashes__0, :hashes__1) ORDER BY LENGTH(redirect_source__query) DESC; Array ( [:hashes__0] => VHxU0vPCJr-V1OSsizmK80UDhnQONLl7Tz053h3jS7o [:hashes__1] => bV7cMvyZ89yvlNLYL938O97yBXE9D8hRNF7i2MHxWVg ) in Drupal\redirect\RedirectRepository->findMatchingRedirect() (line 85 of modules/contrib/redirect/src/RedirectRepository.php).
Drupal\Core\Database\Statement->execute(Array, Array) (Line: 610)
Drupal\Core\Database\Connection->query('SELECT rid FROM {redirect} WHERE hash IN (:hashes__0, :hashes__1) ORDER BY LENGTH(redirect_source__query) DESC', Array, Array) (Line: 87)
Drupal\Core\Database\Driver\mysql\Connection->query('SELECT rid FROM {redirect} WHERE hash IN (:hashes[]) ORDER BY LENGTH(redirect_source__query) DESC', Array) (Line: 85)
Drupal\redirect\RedirectRepository->findMatchingRedirect('node/1', Array, 'en') (Line: 145)
Drupal\redirect\EventSubscriber\RedirectRequestSubscriber->onKernelRequestCheckRedirect(Object, 'kernel.request', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.request', Object) (Line: 125)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 64)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 654)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Result of explain redirect;:

+------------------+------------------+------+-----+---------+----------------+
| Field            | Type             | Null | Key | Default | Extra          |
+------------------+------------------+------+-----+---------+----------------+
| rid              | int(11)          | NO   | PRI | NULL    | auto_increment |
| hash             | varchar(64)      | NO   | UNI | NULL    |                |
| type             | varchar(64)      | NO   | MUL |         |                |
| uid              | int(10) unsigned | NO   |     | 0       |                |
| source           | varchar(255)     | NO   | MUL | NULL    |                |
| source_options   | text             | NO   |     | NULL    |                |
| redirect         | varchar(255)     | NO   |     | NULL    |                |
| redirect_options | text             | NO   |     | NULL    |                |
| language         | varchar(12)      | NO   |     | und     |                |
| status_code      | smallint(6)      | NO   |     | NULL    |                |
| count            | int(10) unsigned | NO   |     | 0       |                |
| access           | int(10) unsigned | NO   |     | 0       |                |
+------------------+------------------+------+-----+---------+----------------+
12 rows in set (0.01 sec)
Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Are you sure you are using the right version from d.o? Core version? mysql? Backtrace for that exception? (enable verbose logging)

There are plenty of tests and they are all passing as of one week ago.

source_options sounds like the 7.x table, no idea why you'd end up with that, maybe you managed to install a very early 8.x version that still had the old schema. The 8.x install doesn't create a table if it already exists.

Try uninstall and re-install.

pjcdawkins’s picture

Title: WSOD after Installing redirect on an almost clean installation » WSOD 'External URLs do not have an internal route name' after installing redirect on an almost clean installation

Aaaaha! Thanks, I didn't realise I wouldn't see an error on installing, if I had the old schema.

It's probably the same problem for #2 then.

But the OP may be different. Sorry for the hijack. Updating title.

Berdir’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing issues that have not been providing additional information for over a month.