Issue Bug Closed

#20873Preview of hidden page translations is not possible

Anonymous 08/13/09, 11:09 updated 07/09/24, 12:00

Description

If the translation of a page is marked as hidden and the default language is not and you try to preview it, you’ll get an error in the frontend that the “Page is not available in the requested language”. With the default language of a page previewing is possible without restrictions.

The problem seems to be line 796 in class.tslib_fe.php

$res = $GLOBALS[‘TYPO3_DB’]->exec_SELECTquery(‘hidden’, ‘pages’, $idQ.’ AND hidden!=0 AND deleted=0’);

Here is checked if the default language of a page is hidden. If so the preview flags will be set. If not, preview mode is disabled, so that in further processing no page translation overlay will be found because the method t3lib_pageSelect::enableFields checks against “hidden=0”.

The only way to show hidden page translations in the frontend is to use the admin panel and set the flag “Show hidden records”. But this is a little bit inconsistent for a backend user if he just uses the magnifiying glass icons to show up pages.

(issue imported from #M11704)

Reviews 2

History 2125

  1. Alexander Opitz commented and changed status New Needs Feedback target version 05/08/13, 23:04

    The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?

  2. Alexander Opitz commented and changed status Needs Feedback Closed Is Regression 0 09/09/13, 11:26

    No feedback for over 90 days.

  3. Tim Jungebluth commented 07/01/15, 15:28

    I got the same problem with TYPO3 6.2.x.

    If I hide – or disable – a translation of a site in the backend, then there is no preview site. Instead an error is thrown.
    The disabled default site with the default language is shown in the preview mode correctly with the red “PREVIEW!” label.

  4. Patrick Broens commented 11/21/17, 15:52

    Although a very old issue, it is still relevant for TYPO3 version 8LTS (8.7)

  5. Sven Burkert commented 09/02/19, 16:08

    Yes, it is. In Version 8.7.27 this problem still exists.

  6. Reinhard Hiebl commented 03/10/20, 02:02

    Using 9.5.13 and disabled translated page throws an error insead an preview page.
    Still no solution?

  7. Georg Ringer commented 03/10/20, 05:20

    Are you on same domains for the translation and the backend?

  8. Ronny Hauptvogel commented 06/04/20, 13:46

    I run into trouble with TYPO3 10.4.2, too.

    The page is disabled in the page tree and the default language could be viewed by an editor, but the translated one not.

    Domain structure is like this:
    • editor is logged in via example.com/typo3
    • the hidden page “test” is viewable by example.com/test
    • but the hidden translation example.com/en/test is not viewable and “The page did not exist or was inaccessible. Reason: ID was not an accessible page” occurs
  9. ondro no-lastname-given commented and changed TYPO3 Version 4.2 9 PHP Version 4.3 7.2 10/01/20, 09:21

    Can confirm same behaviour on typo3 9.5.15

  10. Stefan Neufeind changed status Closed New 10/01/20, 13:32

  11. Anonymous commented and changed TYPO3 Version 9 10 PHP Version 7.2 8.0 06/08/21, 15:58

    The problem is still present in Version 10.4.16

  12. Marco H commented 08/05/21, 06:53

    Is this the longest living bug? :) Still an issue in 10.4.18

  13. Jochen Roth commented 10/11/21, 08:41

    Hey, could not reproduce this issue under latest master (v11.5). It seems to work now.

  14. Marco H commented and changed TYPO3 Version 10 11 PHP Version 8.0 7.4 10/12/21, 15:03

    Jochen Roth wrote in #note-13:
    > Hey, could not reproduce this issue under latest master (v11.5). It seems to work now.

    Did some basic testing, these are the results:

    TYPO3 10 (10.4.18 and 10.4.21):
    page in default language enabled, page translation disabled -> page translation shown as preview in Frontend
    page in default language disabled, page translation disabled -> page translation shown as preview in Frontend
    page in default language disabled, page translation enabled -> page translation not accessible in Frontend *

    TYPO3 11 (11.5.1):
    page in default language enabled, page translation disabled -> page translation shown as preview in Frontend
    page in default language disabled, page translation disabled -> page translation shown as preview in Frontend
    page in default language disabled, page translation enabled -> page translation not accessible in Frontend *

    • Page Not Found
      The page did not exist or was inaccessible. Reason: ID was not an accessible page

    Regarding my comment from before, I might’ve misread the previous reports and I had a bug that shows the same error, but was caused slightly differently. Maybe Joachim Eckerlin can recheck what caused the bug for him.

    So, the combination of disabled page and enabled translation is an issue in current versions of 10 and 11.

  15. Benni Mack commented 11/03/21, 17:13

    Marco H wrote in #note-14:
    > Jochen Roth wrote in #note-13:
    > > Hey, could not reproduce this issue under latest master (v11.5). It seems to work now.
    >
    >
    > Did some basic testing, these are the results:
    >
    > TYPO3 10 (10.4.18 and 10.4.21):
    > page in default language enabled, page translation disabled -> page translation shown as preview in Frontend
    > page in default language disabled, page translation disabled -> page translation shown as preview in Frontend
    > page in default language disabled, page translation enabled -> page translation not accessible in Frontend *
    >
    >
    > TYPO3 11 (11.5.1):
    > page in default language enabled, page translation disabled -> page translation shown as preview in Frontend
    > page in default language disabled, page translation disabled -> page translation shown as preview in Frontend
    > page in default language disabled, page translation enabled -> page translation not accessible in Frontend *
    >
    >
    > * Page Not Found
    > The page did not exist or was inaccessible. Reason: ID was not an accessible page
    >
    >
    >
    > Regarding my comment from before, I might’ve misread the previous reports and I had a bug that shows the same error, but was caused slightly differently. Maybe Joachim Eckerlin can recheck what caused the bug for him.
    >
    >
    > So, the combination of disabled page and enabled translation is an issue in current versions of 10 and 11.

    Hey Marco,

    this is great feedback. Thank you very much. Can you let use know your settings of “hidePagesIfNotTranslatedByDefault” and “pages.l18n_cfg” ?

  16. Marco H commented 11/05/21, 06:46

    Benni Mack wrote in #note-15:
    >
    > Hey Marco,
    >
    > this is great feedback. Thank you very much. Can you let use know your settings of “hidePagesIfNotTranslatedByDefault” and “pages.l18n_cfg” ?

    Both were set to false. However, I did test all true/false combinations (in 10.4.21), the error still persisted.

  17. Filipe DA COSTA commented and changed TYPO3 Version 11 10 02/04/22, 16:03

    Having the same issue on 10.4.22.

    Tracked down the issue to TypoScriptFrontendController::applyPreviewSettings L1091 where the preview is skipped if the page is not hidden.

    For now, I’ve updated the pages TCA:

    $GLOBALS['TCA']['pages']['columns']['hidden']['l10n_mode'] = 'exclude';
    $GLOBALS['TCA']['pages']['columns']['hidden']['l10n_display'] = 'defaultAsReadonly';

    Obviously, this is not really a solution for everybody (what if you want to disable a single translation?).

  18. Markus Klein changed Related to #92775 11/18/22, 16:18

  19. Gerrit Code Review pushed patch set 1 for main to change 79655 status New Under Review 07/06/23, 06:52

  20. Gerrit Code Review pushed patch set 2 for main to change 79655 07/06/23, 10:18

  21. Gerrit Code Review pushed patch set 1 for 12.4 to change 79813 07/06/23, 11:41

  22. Susanne Moog commented and changed status Under Review Resolved done 0 % 100 % 07/06/23, 11:45

    Applied in changeset commit:495c779938df833702406e5e887270c61b4b59c4.

  23. Gerrit Code Review pushed patch set 2 for 12.4 to change 79813 status Resolved Under Review 07/06/23, 11:58

  24. Susanne Moog commented and changed status Under Review Resolved 07/06/23, 12:40

    Applied in changeset commit:6f5f1d9c8e7a47b5a37806fd8b0a8ba8609fddfe.

  25. Benni Mack changed status Resolved Closed 07/09/24, 12:00