Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork pathauto-3301515

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

Quentin Harelle created an issue. See original summary.

sillot’s picture

StatusFileSize
new1.89 KB
cilefen’s picture

Status: Active » Postponed (maintainer needs more info)

You cannot tighten APIs in minor releases. What calling code is causing this?

sillot’s picture

Hi,

Sorry this is my first issue 😬

Here is the stack trace causing this error:

TypeError : Drupal\Component\Transliteration\PhpTransliteration::readLanguageOverrides(): Argument #1 ($langcode) must be of type string, null given, called in /var/www/html/web/core/lib/Drupal/Core/Transliteration/PhpTransliteration.php on line 45 dans Drupal\Component\Transliteration\PhpTransliteration->readLanguageOverrides() (/var/www/html/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php ligne 279)
#0 /var/www/html/web/core/lib/Drupal/Core/Transliteration/PhpTransliteration.php(45): Drupal\Component\Transliteration\PhpTransliteration->readLanguageOverrides()
#1 /var/www/html/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php(233): Drupal\Core\Transliteration\PhpTransliteration->readLanguageOverrides()
#2 /var/www/html/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php(158): Drupal\Component\Transliteration\PhpTransliteration->replace()
#3 /var/www/html/web/modules/contrib/pathauto/src/AliasCleaner.php(242): Drupal\Component\Transliteration\PhpTransliteration->transliterate()
#4 /var/www/html/web/modules/custom/module_custom/src/Service/CustomService.php(806): Drupal\pathauto\AliasCleaner->cleanString()
cilefen’s picture

It looks like modules/custom/module_custom/src/Service/CustomService.php is the cause.

sillot’s picture

Oh, by checking the code more is saw that we are using the aliasCleaner service by pathauto.

It is this service that calls the transliteration service without checking if the langcode is not null.

I'm changing the Project to pathauto and make the patch available.

Thanks for your help cilefen.

sillot’s picture

Project: Drupal core » Pathauto
Version: 9.4.x-dev » 8.x-1.x-dev
Component: transliteration system » Code
StatusFileSize
new631 bytes
sillot’s picture

Status: Postponed (maintainer needs more info) » Needs review

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

anoopsingh92’s picture

Assigned: sillot » anoopsingh92
anoopsingh92’s picture

Assigned: anoopsingh92 » Unassigned
StatusFileSize
new14.74 KB

Hi @Quentin Harelle, I reviewed your patch. It is applying successfully for me.
Patch #2

berdir’s picture

Status: Needs review » Postponed (maintainer needs more info)

Are you sure that this is still a problem in the most recent pathauto release that just came out?

sillot’s picture

@anoopsingh92 Thank you for testing the patch !

@Berdir Indeed, it looks like that with the latest version this is fixed 🙂
I'm closing the issue thanks all !

sillot’s picture

Status: Postponed (maintainer needs more info) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.