Fix LANGUAGE_NONE for transliteration

Created on 9 February 2016, about 9 years ago
Updated 22 February 2024, about 1 year ago

The pathauto update from 1.2 to 1.3 changed the way the language is handled in pathauto_cleanstring(). Now it always tries to pass the language parameter to the transliteration_get() function (if enabled). Prior to 1.3, no parameter was passed and transliteration took the current language.

While this seems to work well for nodes (as they always have a language), I does not work well for taxonomy terms, as by default they use LANGUAGE_NONE, except you're using i18n/entity translation for translating taxonomy terms.

Passing LANGUAGE_NONE to transliteration_get() is not a good idea, as then it misses all language specific transformations (e.g. "รถ" to "oe" in German). I suggest that in this case we should still pass NULL / the current language, which solves the issue for single-language sites.

๐Ÿ› Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

๐Ÿ‡ฆ๐Ÿ‡นAustria mh86

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024