Bug #75981
closed
Timing of content elements in other languages not allowed (tt_content, l10n_display, defaultAsReadonly)
Added by Daniel Wagner over 8 years ago.
Updated over 5 years ago.
Category:
Backend User Interface
Description
Scenario
Hide text&image CE at different dates in different languages.
There has been a decision that translated records cannot have independent start/end dates. (#68312)
So an independent record has to be created in the translation language.
Language Configuration
config.sys_language_mode = strict
config.sys_language_overlay >
Reproduce
- create a page
- translate this page
- create a text&image CE on translated page
- try to change expiration date (not possible here)
- save and close
- edit CE and try to change expiration date (not possible here)
Versions
TYPO3 CMS 6.2.21
Workaround
- remove Transl.Orig (record becomes independent)
- set language to Default (move to default language)
- save, close and edit
- change access date/time
- set language to original language
Remark
Bug #54093: 'l10n_display' => 'defaultAsReadonly' not working with mm table
Files
Problem still exists in TYPO3 CMS 6.2.25 but not in TYPO3 CMS 7.6.9.
6.2 contained before rewrite of form engine in 7.6 in class FormEngine:
// Set field to read-only if configured for translated records to show default language content as readonly
if ($PA['fieldConf']['l10n_display'] && GeneralUtility::inList($PA['fieldConf']['l10n_display'], 'defaultAsReadonly') && $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] > 0) {
$PA['fieldConf']['config']['readOnly'] = TRUE;
$PA['itemFormElValue'] = $this->defaultLanguageData[$table . ':' . $row['uid']][$field];
}
The IF-Condition is wrong (also true for translated independent content: $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] > 0).
In 7.6 in class SingleFieldContainer this condition has been replaced by a variable $isOverlay which defaults to false and is set to true:
// This field decides whether the current record is an overlay (as opposed to being a standalone record)
// Based on this decision we need to trigger field exclusion or special rendering (like readOnly)
if (isset($this->data['processedTca']['ctrl']['transOrigPointerField'])
&& is_array($this->data['processedTca']['columns'][$this->data['processedTca']['ctrl']['transOrigPointerField']])
&& is_array($row[$this->data['processedTca']['ctrl']['transOrigPointerField']])
&& $row[$this->data['processedTca']['ctrl']['transOrigPointerField']][0] > 0
) {
$isOverlay = true;
}
So, a better way (by transOrigPointerField) is used to detect (dependent/independent) translations.
- Status changed from New to Closed
I am closing this issue as - see the last comment - it only affects the outdated 6.2 version, which is no more supported (since April 2017).
If you still need this issue to be fixed, I think you should consider opting for Extended Long Term Support, a special service provided by TYPO3 GmbH (https://typo3.com/services/extended-support/)
Please reopen it (or open a new issue with a reference to this one) if this issue still affects recent TYPO3 versions like 8.7.x or 9.5.x. Thank you.
Also available in: Atom
PDF