Issue Bug Closed

#92442Preview of a record's translation is not show if parent is hidden

Rémy DANIEL 09/29/20, 13:00 updated 12/02/25, 14:33

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.

Reviews 2

Files 4

History 1621

  1. Rémy DANIEL commented and changed attached typo3_extbase_fix_localized_record_preview.patch <span data-processor="relativetime" data-value="2020-09-29T13:12:58+00:00" > 09/29/20, 13:12 </span>

    Patch attached for V9

  2. Daniel Siepmann commented and changed attached INP-1208-handle-hidden-preview-on-foreign-languages.patch <span data-processor="relativetime" data-value="2022-09-14T07:52:25+00:00" > 09/14/22, 07:52 </span>

    Patch attached for v10

  3. Daniel Siepmann commented <span data-processor="relativetime" data-value="2022-09-14T11:54:29+00:00" > 09/14/22, 11:54 </span>

    I could not reproduce the issue in v11 anymore.

  4. Markus Klein changed status New Needs Feedback removed the assignee <span data-processor="relativetime" data-value="2022-11-18T16:14:47+00:00" > 11/18/22, 16:14 </span>

  5. Rémy DANIEL commented <span data-processor="relativetime" data-value="2023-01-13T14:15:45+00:00" > 01/13/23, 14:15 </span>

    I confirm too: I can’t reproduce the issue in TYPO3 11 (11.5.22 during my tests)

  6. Riccardo De Contardi commented <span data-processor="relativetime" data-value="2023-01-13T14:17:01+00:00" > 01/13/23, 14:17 </span>

    Hi DANIEL Rémy , thank you for your feedback.

    Do you think that this issue can be closed?

    Thanks

  7. Rémy DANIEL commented <span data-processor="relativetime" data-value="2023-01-13T14:42:29+00:00" > 01/13/23, 14:42 </span>

    I would say YES, because it cannot be reproduced.

    But I can’t say how and when the issue was fixed.

  8. Daniel Siepmann commented <span data-processor="relativetime" data-value="2023-06-22T13:27:19+00:00" > 06/22/23, 13:27 </span>

    Looks like we have the issue again now (11.5.23 + 11.5.27)

  9. Daniel Siepmann commented and changed attached INP-1208-handle-hidden-preview-on-foreign-languages.patch <span data-processor="relativetime" data-value="2023-06-26T06:23:38+00:00" > 06/26/23, 06:23 </span>

    Here’s our applied composer patch for v11.

  10. Daniel Schöne changed attached INP-1208-handle-hidden-preview-on-foreign-languages.patch <span data-processor="relativetime" data-value="2024-11-11T12:48:32+00:00" > 11/11/24, 12:48 </span>

  11. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-07-25T17:50:08+00:00" > 07/25/25, 17:50 </span>

    Applied in changeset commit:3227103a4e1d4df278f71fe8ab5b6f7f0308aa20.