Problem

DomainPathAliasManager has a configurable language_method setting, but both the code fallback and the install config default to language_content (TYPE_CONTENT). The default should be language_url (TYPE_URL) to match core behavior.

Core's AliasManager::getAliasByPath() explicitly defaults to TYPE_URL with this rationale:

If no language is explicitly specified we default to the current URL language. If we used a language different from the one conveyed by the requested URL, we might end up being unable to check if there is a path alias matching the URL path.

Proposed fix

  • Change the fallback default from TYPE_CONTENT to TYPE_URL in both getPathByAliasAndDomain() and getAliasByPathAndDomain()
  • Change domain_path.settings.yml install default from language_content to language_url
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

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review
mably’s picture

Status: Needs review » Closed (won't fix)

Not sure this is any better that what we currently have.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.