Bug #97616
closedBodytext of default Language shown in Translation on NULL
100%
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?
- Setup TYPO3 10/11/main with at least two languages. Use strict mode.
- Create a ce "Header".
- Then translate this ce (connected mode).
- 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)
Files
Updated by André Buchmann over 2 years ago
Location where the error is created in PageRepository: https://github.com/typo3/typo3/blob/279ccf1f77b360fe3731ba9026f5bbc8628ec659/typo3/sysext/core/Classes/Domain/Repository/PageRepository.php#L692-L698
isset($olrow[$fN])
evaluates true
with this:
$olrow[ 'bodytext' => '' ];
But false
whith this:
$olrow[ 'bodytext' => null ];
And then the overlay is skipped and the value of the default language stays in the $row
Updated by Gerrit Code Review over 2 years ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74632
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74632
Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74632
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74834
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74834
Updated by Anonymous over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 12da9f626d14de0075f3d2a207548f0cb27bb524.
Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 3 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74834
Updated by Gerrit Code Review over 2 years ago
Patch set 4 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74834
Updated by Gerrit Code Review over 2 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74837
Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74837
Updated by Anonymous over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 1708cda8960085265bf5eecafb52ba0549dedac0.
Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 3 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74837
Updated by Gerrit Code Review over 2 years ago
Patch set 4 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/74837
Updated by Anonymous over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset cb1d82f7235f3f0bb690d855348e8edee3379c4d.