Add support for the languge_access module

Created on 25 August 2023, over 1 year ago

Problem/Motivation

Tried to use the module, installed via composer and enabled but nothing seems to change in the node translation UI, nor does automatic matching of aliases seem to do anything.

I can load the soft_translations.manager service and query it with an entity using drush, and find out that indeed, there are no soft translations for this node.

$ drush php:cli
> $tm = \Drupal::service('soft_translations.manager');
> $etm = \Drupal::service('entity_type.manager');
> $entity = $etm->getStorage('node')->load(60);
> $tm->getSoftTranslations($entity);
= []

Steps to reproduce

  1. Install module on Drupal 9.5.10
    $ composer require drupal/soft_translations
    $ drush pm-enable soft_translations
    
  2. Look for a way to split off translations

This may well be a PEBKAC error, but in that case I would posit that the module is too hard to figure out.

🐛 Bug report
Status

Closed: works as designed

Version

1.1

Component

Code

Created by

🇫🇮Finland sthomen

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

Comments & Activities

  • Issue created by @sthomen
  • Status changed to Closed: works as designed over 1 year ago
  • 🇫🇮Finland sthomen

    I investigated the problem myself to look for a temporary patch, and it seems it was that the language_access module also overrides the ContentTranslationController. Adding 'Drupal\language_access\Controller\ContentTranslationController::overview' to the SoftTranslationRouteSubscriber made the "split off" entries appear and I could split the translation out.

    Additionally while reading the code I also found out that mechanism for matching split off pages with their trnanslation counterpart seems to be solely using page aliases which makes this module useless to me.

Production build 0.71.5 2024