Viewing a page with country code causes infinit redirect then error 500.

Created on 15 March 2024, 6 months ago
Updated 18 March 2024, 6 months ago

Viewing a page that have country code cause infinit redirect then error 500.
Example path: /us/page-url-alias

Modules installed:

Drupal version: 10.1.8

Configuration Translation - Version: 10.1.8
Content Translation - Version: 10.1.8
Interface Translation - Version: 10.1.8
Language - Version: 10.1.8
Language Hierarchy - Version: 2.0.0-rc5
Path - Version: 10.1.8
Redirect - Version: 8.x-1.9

Site Studio core - Version: 8.x-7.4.0

This happens on both my localhost(Windows) and
dev environment.

Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial

// PathProcessorManager.php
protected function sortProcessors($type) {
    krsort($this->{$type});
    return array_merge(...$this->{$type});
  }
// Changing to this seems resolve the issue:
protected function sortProcessors($type) {
    krsort($this->{$type});
    return array_merge([],...$this->{$type});
}
๐Ÿ› Bug report
Status

Closed: works as designed

Version

10.1 โœจ

Component
Otherย  โ†’

Last updated about 7 hours ago

Created by

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

Comments & Activities

  • Issue created by @n-m-daz
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    What specifically are the โ€œlocationโ€ HTTP headers? What exactly is the 500 error logged?

  • Dev env log:
    php-error ded-47001 [15-Mar-2024 13:37:20 Europe/London] PHP Fatal error: Aborting! The New Relic imposed maximum PHP function nesting level of '5000' has been reached. This limit is to prevent the PHP execution from catastrophically running out of C-stack frames. If you think this limit is too small, adjust the value of the setting newrelic.special.max_nesting_level in the newrelic.ini file, and restart php. Please file a ticket at https://support.newrelic.com if you need further assistance. in /mnt/www/html/cambunipressloadtest/docroot/modules/contrib/key/src/KeyConfigOverrides.php on line 115 request_id="v-25d327a4-e2d1-11ee-8002-cbe2c8d7752a"

    Localhost log:
    Only in this error that there is no log showing

    Already have this:
    error_reporting(E_ALL);
    error_reporting(-1);
    ini_set('error_reporting', E_ALL);
    set_time_limit(0);
    ini_set('memory_limit','2048M');

    $config['system.logging']['error_level'] = 'verbose';

    Response header:

    Age:
    0
    Content-Length:
    0
    Content-Type:
    text/html; charset=UTF-8
    Date:
    Fri, 15 Mar 2024 13:37:20 GMT
    Server:
    nginx
    Via:
    varnish
    X-Ah-Environment:
    env-name
    X-Cache:
    MISS
    X-Request-Id:
    v-25d327a4-e2d1-11ee-8002-cbe2c8d7752a

    Response preview:
    Failed to load response data. No resource with given identifier found.

    Request header

    :authority:
    env-url-here
    :method:
    GET
    :path:
    /us/nodealias
    :scheme:
    https
    Accept:
    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
    Accept-Encoding:
    gzip, deflate, br, zstd
    Accept-Language:
    en-GB,en-US;q=0.9,en;q=0.8
    Cache-Control:
    max-age=0
    Cookie:
    locale=en_US; preferredCountry=US; preferredLocale=en_US; other cookies
    Sec-Ch-Ua:
    "Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"
    Sec-Ch-Ua-Mobile:
    ?0
    Sec-Ch-Ua-Platform:
    "Windows"
    Sec-Fetch-Dest:
    document
    Sec-Fetch-Mode:
    navigate
    Sec-Fetch-Site:
    none
    Sec-Fetch-User:
    ?1
    Upgrade-Insecure-Requests:
    1
    User-Agent:
    Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

  • Status changed to Postponed: needs info 6 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen

    This issue says that this is a redirect bug but the HTTP response has no location header. How did you conclude this involves redirects?

    Is xdebug enabled?

    This bug report needs very clear steps to reproduce that begin with installing Drupal.

  • After further investigation this is cause by by custom _language_fallback_candidates_alter hook that call getPathByAlias.
    The hook_language_fallback_candidates_alter is being called infinitely resulting in memory exhaustion.

  • Status changed to Closed: works as designed 6 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States cilefen
Production build 0.71.5 2024