Language Fallback support

Created on 16 November 2021, over 3 years ago
Updated 16 April 2025, 10 days ago

Problem/Motivation

Domain paths don't allow for language fallback, and as a result, alternative paths aren't used if one isn't available for the current language.

This would mirror the functionality in πŸ› path.alias_repository service does not use a proper language fallback mechanism Needs work .

Steps to reproduce

Enable language hierarchy or language fallback modules, and configure the fallback system. Add an alias for a fallback language, and attempt to navigate to it via the ui.

Proposed resolution

Allow for fallback languages when converting to and from path aliases.

Remaining tasks

Review changes.

User interface changes

None.

API changes

The alias manager will respect the language fallback system, which may result in additional path aliases being available.

Data model changes

None.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States richgerdes New Jersey, USA

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

Comments & Activities

Not all content is available!

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

  • πŸ‡¨πŸ‡¦Canada davidarbour

    Seems to be working. It fixes the the 404 error when the node doesn't have a translation and uses the fallback language path alias

  • πŸ‡¨πŸ‡¦Canada davidarbour

    It's work as the module is already enable.

    I did try to add the patch then push it to the dev environment where domain_path is not yet installed, and drush deploy failed. The patch breaks the module installation.

    Here's the error I had.

    [error]  The "domain_path" entity type does not exist.
    
    > In EntityTypeManager.php line 142:
    
    >   The "domain_path" entity type does not exist.
    
    Fatal error: Uncaught Drupal\Component\Plugin\Exception\PluginNotFoundException: The "domain_path" entity type does not exist. in /var/www/html/docroot/core/lib/Drupal/Core/Entity/EntityTypeManager.php:142
Production build 0.71.5 2024