Bug #92442
openPreview of a record's translation is not show if parent is hidden
0%
Description
Hi
Given the following record set:
- record 1, sys_language_uid=0, hidden=1
- record 2, sys_language_uid=1, l10n_parent=1, hidden=1
Make an extbase plugin which lists the records using an extbase repository, and put this plugin on a page.
The issue
In the admin panel I check "show hidden records" and I can preview the record 1 if FE language is 0.
If FE language is 1, I cannot preview the record 2.
If I unhide the record 1, its works: I can see the record 2.
Expected
I should be able to preview a hidden record either if it is a base record or a translation, and whatever the hidden status of the base record is.
Explanation and fix proposal
The issue resides in Typo3DbQueryParser::addTypo3Constraints() which uses a doctrine query builder in order to add the additional where clause related to localization handling (content fallback + hideNonTranslated).
But the query builder is using the DefaultRestrictionContainer, which does not check the Visibility aspect at all when building the expressions.
In order to fix the issue, Typo3DbQueryParser must check for frontend mode, and set FrontendRestrictionContainer instead of DefaultRestrictionContainer in the needed query builders.
Files
Updated by Rémy DANIEL about 4 years ago
- File typo3_extbase_fix_localized_record_preview.patch typo3_extbase_fix_localized_record_preview.patch added
Patch attached for V9
Updated by Daniel Siepmann about 2 years ago
- File INP-1208-handle-hidden-preview-on-foreign-languages.patch INP-1208-handle-hidden-preview-on-foreign-languages.patch added
Patch attached for v10
Updated by Daniel Siepmann about 2 years ago
I could not reproduce the issue in v11 anymore.
Updated by Markus Klein about 2 years ago
- Status changed from New to Needs Feedback
- Assignee deleted (
Tymoteusz Motylewski)
Updated by Rémy DANIEL almost 2 years ago
I confirm too: I can't reproduce the issue in TYPO3 11 (11.5.22 during my tests)
Updated by Riccardo De Contardi almost 2 years ago
Hi DANIEL Rémy , thank you for your feedback.
Do you think that this issue can be closed?
Thanks
Updated by Rémy DANIEL almost 2 years ago
I would say YES, because it cannot be reproduced.
But I can't say how and when the issue was fixed.
Updated by Markus Klein almost 2 years ago
- Status changed from Needs Feedback to Closed
Updated by Daniel Siepmann over 1 year ago
Looks like we have the issue again now (11.5.23 + 11.5.27)
Updated by Daniel Siepmann over 1 year ago
- File INP-1208-handle-hidden-preview-on-foreign-languages.patch INP-1208-handle-hidden-preview-on-foreign-languages.patch added
Here's our applied composer patch for v11.