Problem/Motivation

Warning: Undefined array key "route:[language]=xxx:/article/*************:" in Drupal\Core\Cache\DatabaseBackend->getMultiple() (line 121 of /home/******/public_html/core/lib/Drupal/Core/Cache/DatabaseBackend.php)
#0

Steps to reproduce

1- Install Drupal 9.3.2
2- Installl the module
3- Install language module and add a secondary language
4- Make an article with translation in both format
5- Provide an alias, and then provide a new alias (Two alias see the redirection in action)
6- Browse to the first provided alias

Proposed resolution

I assume, the URL redirect in the backend has issue with content language detection. Think of this way the worn-out url path of "/article/10" redirects to the new alias "/article/something-utf-8-string", in this jump article/10 > node/10 > /article/.... not all the variables are taken into consideration at the last part when the node/nid switches to new alias.
This issue logs about 7 to 9 php-errors every time the url is visited. Also, at the same time an error logged due to page not found with regard to issue of UTF-8 character coding and decoding which is discussed here:

High number of page not found in the log file due to path encoding

CommentFileSizeAuthor
#3 php-undefined.png255.93 KBtsotoodeh
#2 php-error.jpg177.31 KBtsotoodeh

Issue fork redirect-3257559

Command icon 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

tsotoodeh created an issue. See original summary.

tsotoodeh’s picture

StatusFileSize
new177.31 KB

Screenshot attached.

tsotoodeh’s picture

StatusFileSize
new255.93 KB

The redirect function logs so many php errors in the log file on accessing the redirect pages. Below is the error:

Warning: Undefined array key "https://www.**********.com/site:" in Drupal\Core\Cache\DatabaseBackend->getMultiple() (line 121 of /home/********/public_html/core/lib/Drupal/Core/Cache/DatabaseBackend.php)
#0 /home/********/public_html/core/includes/bootstrap.inc(346): _drupal_error_handler_real(2, 'Undefined array...', '/home/********/p...', 121)
#1 /home/********/public_html/core/lib/Drupal/Core/Cache/DatabaseBackend.php(121): _drupal_error_handler(2, 'Undefined array...', '/home/********/p...', 121)
#2 /home/********/public_html/core/lib/Drupal/Core/Cache/DatabaseBackend.php(92): Drupal\Core\Cache\DatabaseBackend->getMultiple(Array, false)
#3 /home/********/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(306): Drupal\Core\Cache\DatabaseBackend->get('https://www.per...', false)
#4 /home/********/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(124): Drupal\page_cache\StackMiddleware\PageCache->get(Object(Symfony\Component\HttpFoundation\Request))
#5 /home/********/public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#6 /home/********/public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#7 /home/********/public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 /home/********/public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#9 /home/********/public_html/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#10 /home/********/public_html/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#11 /home/********/public_html/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#12 {main}

Lilit_Ghazaryan made their first commit to this issue’s fork.