Issue Bug Closed

#97616Bodytext of default Language shown in Translation on NULL

André Buchmann 05/12/22, 11:43 updated 10/04/22, 14:03

Description

Problem:

Translated content elements are showing the bodytext content of the default language instead of nothing when value is NULL instead of empty string ''

Short:

  • Language is set to “strict” mode in site configuration.
  • Content element (= ce) is translated using the connected mode.
  • Bodytext field value of translation is NULL instead of empty string ''
  • Bodytext field of default language has some content.

—-

How to reproduce?

  1. Setup TYPO3 10/11/main with at least two languages. Use strict mode.
  2. Create a ce “Header”.
  3. Then translate this ce (connected mode).
  4. Edit the ce in the default language:
    • Switch type to “Text & Media”
    • Add some content to the bodytext field

Optional Steps:

  • Change the translated ce also to “Text & Media” and save. But DON’T touch the bodytext field!
  • Check your database: Is the bodytext value NULL or ''

When you create a textmedia directly or delete text from the bodytext with the RTE, the field will be saved as empty string.

The field is defined as bodytext mediumtext, in the ext_tables.sql. Therefore IMHO NULL and empty string '' should behave the same way.

—

You find example data for a very basic setup attached (Site config + Dump: sys_template, pages & tt_content)

Reviews 3