Score:1

path alias OK for default language, but no alias for others

nl flag

My site is in D9, mainly in French, with some pages in English.

I have an old page (note 553 written in D6 in 2017), which can be correctly accessed in French with https://mysite/myoldpage and in English with https://mysite/en/myoldpage.

I've just written a new page in French (https://mysite/mynewpage) and translated it in English. But the translated page is only accessible with https://mysite/en/node/997.

I don't understand why the old page works perfectly and not the new one.

I see a difference in https://mysite/node/553/translations and in https://mysite/node/997/translations. For the old one, I see a "source language" column. For the new one, There is no such column (but I do see the 2 lines for the 2 languages).

Parts of my conf:

  • Language selection is firstly by URL.
  • I use pathauto, but not for "pages"

Any hint appreciated!

4uk4 avatar
cn flag
The old node probably has an alias with the language code UND (-not specified-). You can add one in the alias table, but not in the node edit form. See https://www.drupal.org/node/2689459. The column source language only shows when there are translations with a source language other than the original language, but this is not connected to this alias issue.
Benoit avatar
nl flag
4uk4, you are right! The alias of the new page was defined as in French. I went in /admin/config/search/path, edited my new alias, and set its language as "not specified". English translation is now correctly at /en/mynewpage. Thanks you!
Score:1
cn flag

The old node probably has an alias with the language code UND (-not specified-). You can add one in the alias table

www.example.com/admin/config/search/path

but not in the node edit form. See https://drupal.org/node/2689459.

The column source language only shows when there are translations with a source language other than the original language, but this is not connected to this alias issue.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.