LanguageNegotiationCountryPathUrl plugin not returned on Language Negotiator getNegotiationMethods() call

Created on 17 August 2021, over 3 years ago
Updated 26 April 2025, 2 days ago

Problem/Motivation

Calls to the core service `$language_negotiator->getNegotiationMethods(LanguageInterface::TYPE_URL)` do not return the `country-path-language-url` plugin provided by this module.

When the $type argument is provided as in the above call, LanguageNegotiator calls its `getEnabledNegotiators()` method,
which returns `return $this->configFactory->get('language.types')->get('negotiation.' . $type . '.enabled') ?: [];`

When inspecting my active configuration in `language.types.yml` for "negotiation.language_url" I only see:

language_url:
    enabled:
      language-url: 0
      language-url-fallback: 1

The module is enabled, and is listed under both the "negotiation.language_content" and "negotiation.language_interface" enabled types.

It's not clear to me whether this is an issue with the schema of this module, or something with how core is managing the language types config.

This issue was discovered while debugging a problem with the multilingual sitemap generation within the Simple XML Sitemap module, specifically the call to static method `SitemapGeneratorBase::isMultilingualSitemap()`

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ben.hamelin Adirondack Mountains, NY

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