I have a Drupal 8.4 site with 3 languages, use pathauto to generate per language paths. When this module is enabled and configured to be the first negotiation the translating of the admin interface works as expected, yet the nodes with a automatic path in another language then default language are returning a 404 error.

After disabling the negotiation of this module, all generated paths work as expected.

I suspect it has something to do with this module overriding the negotiation of language.

For completion this is the current negotiation setup

Comments

Rene Bakx created an issue. See original summary.

rene bakx’s picture

Issue summary: View changes
mpp’s picture

What pages have you configured?
I assume you don't have /node on the list.

Specify on which paths the administration language negotiations should be circumvented.

The default list is:

/admin
/admin/*
/admin*
/node/add/*
/node/*/edit
/node/*/translations
/node
Specify on which paths the administration language negotiations should be circumvented.

My use case seems to be the inverse of what this module does. I want my admin pages to appear in a predefined language.
So I'd expect a whitelist instead of a blacklist.

mpp’s picture

Priority: Normal » Critical

I can confirm that this module doesn't work with pathauto, marking this issue as critical.

pol’s picture

Hi,

This is critical indeed. Did you found a workaround to get it working ?

Thanks.

rene bakx’s picture

I didn't, got lost in the woods with the code and disabled this module to move on with my project.

It looks like the function that returns a language code instead of a boolean like defined in the interface is somewhat related to this issue. That could cause this module to throw a 404 instead of passing it to the next negotiator in the chain.

mgorla’s picture

Maybe I've found a possible cause for the this issue.

In the evaluate method within the Paths plugin the alias is searched omitting the language code.
For some reason omitting this parameter breaks the route matcher.

I've created a small patch, hopes it helps someone.

  • Pol committed a19bdd7 on 8.x-1.x authored by mgorla
    Issue #2918972 by mgorla, Pol, Rene Bakx: Module generates 404 pages...
pol’s picture

Status: Active » Fixed

Ah nice!

I've fixed the small issue in the patch and committed it.

Status: Fixed » Closed (fixed)

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