Project

General

Profile

Actions

Bug #20873

closed

Preview of hidden page translations is not possible

Added by Tobias Pinnekamp over 14 years ago. Updated 10 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-08-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #92775: Preview of a page in an additional language fails if default and localized page is hiddenResolved2020-11-05

Actions
Actions #1

Updated by Alexander Opitz almost 11 years ago

  • Status changed from New to Needs Feedback
  • Target version deleted (0)

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

Actions #2

Updated by Alexander Opitz over 10 years ago

  • Status changed from Needs Feedback to Closed
  • Is Regression set to No

No feedback for over 90 days.

Actions #3

Updated by Tim Jungebluth almost 9 years ago

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.

Actions #4

Updated by Patrick Broens over 6 years ago

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

Actions #5

Updated by Sven Burkert over 4 years ago

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

Actions #6

Updated by Reinhard Hiebl about 4 years ago

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

Actions #7

Updated by Georg Ringer about 4 years ago

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

Actions #8

Updated by Ronny Hauptvogel almost 4 years ago

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
Actions #9

Updated by ondro no-lastname-given over 3 years ago

  • TYPO3 Version changed from 4.2 to 9
  • PHP Version changed from 4.3 to 7.2

Can confirm same behaviour on typo3 9.5.15

Actions #10

Updated by Stefan Neufeind over 3 years ago

  • Status changed from Closed to New
Actions #11

Updated by Anonymous almost 3 years ago

  • TYPO3 Version changed from 9 to 10
  • PHP Version changed from 7.2 to 8.0

The problem is still present in Version 10.4.16

Actions #12

Updated by Marco H over 2 years ago

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

Actions #13

Updated by Jochen Roth over 2 years ago

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

Actions #14

Updated by Marco H over 2 years ago

  • TYPO3 Version changed from 10 to 11
  • PHP Version changed from 8.0 to 7.4

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.

Actions #15

Updated by Benni Mack over 2 years ago

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" ?

Actions #16

Updated by Marco H over 2 years ago

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.

Actions #17

Updated by Filipe DA COSTA COSTA about 2 years ago

  • TYPO3 Version changed from 11 to 10

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?).

Actions #18

Updated by Markus Klein over 1 year ago

  • Related to Bug #92775: Preview of a page in an additional language fails if default and localized page is hidden added
Actions #19

Updated by Gerrit Code Review 10 months 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/+/79655

Actions #20

Updated by Gerrit Code Review 10 months 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/+/79655

Actions #21

Updated by Gerrit Code Review 10 months ago

Patch set 1 for branch 12.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/+/79813

Actions #22

Updated by Susanne Moog 10 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #23

Updated by Gerrit Code Review 10 months ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 12.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/+/79813

Actions #24

Updated by Susanne Moog 10 months ago

  • Status changed from Under Review to Resolved
Actions

Also available in: Atom PDF