Recurring loop when redirect parent to sub on D10.2

Created on 9 April 2024, 9 months ago
Updated 4 May 2024, 8 months ago

After upgrading from D9.5 to D10.2, subpathauto 1.2 to 1.3v
(The module works well on D9.5 subpathauto 1.2 but starts to have issues only on D10 subpathauto 1.3 tested on new installetion and existing DB)

When enabling the module (or re-enabling after the update) and having existing redirect - for instance redirecting 301 from '/news' to '/news/event'
It starts an infinitely recurring loop that ends when memory is exhausted.

Result in /admin/config/search/redirect:
( ! ) Warning: Uncaught Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '500' frames in /code/vendor/symfony/http-foundation/ParameterBag.php:200 Stack trace: #0 {main} thrown in /code/vendor/symfony/http-foundation/ParameterBag.php on line 200

Part of the recurring error code:

...
  529.7210  192441000  42. Drupal\link\Plugin\Field\FieldType\LinkItem->getUrl() /code/web/core/modules/menu_link_content/src/Entity/MenuLinkContent.php:95
  529.7210  192441000  43. Drupal\Core\Url::fromUri($uri = 'internal:/news/list', $options = []) /code/web/core/modules/link/src/Plugin/Field/FieldType/LinkItem.php:175
  529.7210  192441456  44. Drupal\Core\Url::fromInternalUri($uri_parts = ['scheme' => 'internal', 'path' => '/news/list'], $options = []) /code/web/core/lib/Drupal/Core/Url.php:319
  529.7210  192441872  45. Drupal\Core\Path\PathValidator->getUrlIfValidWithoutAccessCheck($path = 'news/list') /code/web/core/lib/Drupal/Core/Url.php:427
  529.7210  192441872  46. Drupal\Core\Path\PathValidator->getUrl($path = 'news/list', $access_check = FALSE) /code/web/core/lib/Drupal/Core/Path/PathValidator.php:89
  529.7212  192447032  47. Drupal\Core\Path\PathValidator->getPathAttributes($path = 'news/list', $request = class Symfony\Component\HttpFoundation\Request { public $attributes = class Symfony\Component\HttpFoundation\ParameterBag { protected $parameters = [...] }; public $request = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $query = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $server = class Symfony\Component\HttpFoundation\ServerBag { protected $parameters = [...] }; public $files = class Symfony\Component\HttpFoundation\FileBag { protected $parameters = [...] }; public $cookies = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $headers = class Symfony\Component\HttpFoundation\HeaderBag { protected $headers = [...]; protected $cacheControl = [...] }; protected $content = NULL; protected $languages = NULL; protected $charsets = NULL; protected $encodings = NULL; protected $acceptableContentTypes = NULL; protected $pathInfo = '/news/list'; protected $requestUri = '/news/list'; protected $baseUrl = ''; protected $basePath = NULL; protected $method = NULL; protected $format = NULL; protected $session = NULL; protected $locale = NULL; protected $defaultLocale = 'en'; private ?string $preferredFormat = NULL; private bool $isHostValid = TRUE; private bool $isForwardedValid = TRUE; private bool $isSafeContentPreferred = *uninitialized*; private array $trustedValuesCache = []; private $isIisRewrite = FALSE }, $access_check = FALSE) /code/web/core/lib/Drupal/Core/Path/PathValidator.php:122
  529.7212  192447072  48. Drupal\Core\PathProcessor\PathProcessorManager->processInbound($path = '/news/list', $request = class Symfony\Component\HttpFoundation\Request { public $attributes = class Symfony\Component\HttpFoundation\ParameterBag { protected $parameters = [...] }; public $request = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $query = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $server = class Symfony\Component\HttpFoundation\ServerBag { protected $parameters = [...] }; public $files = class Symfony\Component\HttpFoundation\FileBag { protected $parameters = [...] }; public $cookies = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $headers = class Symfony\Component\HttpFoundation\HeaderBag { protected $headers = [...]; protected $cacheControl = [...] }; protected $content = NULL; protected $languages = NULL; protected $charsets = NULL; protected $encodings = NULL; protected $acceptableContentTypes = NULL; protected $pathInfo = '/news/list'; protected $requestUri = '/news/list'; protected $baseUrl = ''; protected $basePath = NULL; protected $method = NULL; protected $format = NULL; protected $session = NULL; protected $locale = NULL; protected $defaultLocale = 'en'; private ?string $preferredFormat = NULL; private bool $isHostValid = TRUE; private bool $isForwardedValid = TRUE; private bool $isSafeContentPreferred = *uninitialized*; private array $trustedValuesCache = []; private $isIisRewrite = FALSE }) /code/web/core/lib/Drupal/Core/Path/PathValidator.php:157
  529.7221  192447112  49. Drupal\subpathauto\PathProcessor->processInbound($path = '/news/list', $request = class Symfony\Component\HttpFoundation\Request { public $attributes = class Symfony\Component\HttpFoundation\ParameterBag { protected $parameters = [...] }; public $request = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $query = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $server = class Symfony\Component\HttpFoundation\ServerBag { protected $parameters = [...] }; public $files = class Symfony\Component\HttpFoundation\FileBag { protected $parameters = [...] }; public $cookies = class Symfony\Component\HttpFoundation\InputBag { protected $parameters = [...] }; public $headers = class Symfony\Component\HttpFoundation\HeaderBag { protected $headers = [...]; protected $cacheControl = [...] }; protected $content = NULL; protected $languages = NULL; protected $charsets = NULL; protected $encodings = NULL; protected $acceptableContentTypes = NULL; protected $pathInfo = '/news/list'; protected $requestUri = '/news/list'; protected $baseUrl = ''; protected $basePath = NULL; protected $method = NULL; protected $format = NULL; protected $session = NULL; protected $locale = NULL; protected $defaultLocale = 'en'; private ?string $preferredFormat = NULL; private bool $isHostValid = TRUE; private bool $isForwardedValid = TRUE; private bool $isSafeContentPreferred = *uninitialized*; private array $trustedValuesCache = []; private $isIisRewrite = FALSE }) /code/web/core/lib/Drupal/Core/PathProcessor/PathProcessorManager.php:70
  529.7246  192456864  50. Drupal\subpathauto\PathProcessor->checkRedirectedPath($path = '/news') /code/web/modules/contrib/subpathauto/src/PathProcessor.php:125
...

Does it happen to anyone else?

๐Ÿ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡บAustralia gigimaor Narangba/Brisbane

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

Comments & Activities

Production build 0.71.5 2024