Fix a null exception on a non existing translation

Created on 14 May 2021, almost 4 years ago
Updated 25 September 2024, 6 months ago

Problem/Motivation

Fix a null exception on a non existing translation.

Steps to reproduce

When a site is in say the Germany language and all content was created in the Germany language. When l access the page in English i.e site.de/en/admin/config/development/content/export/single a null exception will occur as the code tries to get a non existing English translation from the node.

Proposed resolution

Check if the translation exists and if not use the original translation in which the node was created.

Remaining tasks

Create a patch.

User interface changes

Nothing.

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

4.0

Component

Translation

Created by

🇳🇱Netherlands bonrita

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.

Production build 0.71.5 2024