Bug #20873
closedPreview of hidden page translations is not possible
Added by Tobias Pinnekamp over 15 years ago. Updated 5 months ago.
100%
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)
Updated by Alexander Opitz over 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)?
Updated by Alexander Opitz about 11 years ago
- Status changed from Needs Feedback to Closed
- Is Regression set to No
No feedback for over 90 days.
Updated by Tim Jungebluth over 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.
Updated by Patrick Broens about 7 years ago
Although a very old issue, it is still relevant for TYPO3 version 8LTS (8.7)
Updated by Sven Burkert about 5 years ago
Yes, it is. In Version 8.7.27 this problem still exists.
Updated by Reinhard Hiebl over 4 years ago
Using 9.5.13 and disabled translated page throws an error insead an preview page.
Still no solution?
Updated by Georg Ringer over 4 years ago
Are you on same domains for the translation and the backend?
Updated by Ronny Hauptvogel over 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
Updated by ondro no-lastname-given about 4 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
Updated by Anonymous over 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
Updated by Marco H over 3 years ago
Is this the longest living bug? :) Still an issue in 10.4.18
Updated by Jochen Roth about 3 years ago
Hey, could not reproduce this issue under latest master (v11.5). It seems to work now.
Updated by Marco H about 3 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.
Updated by Benni Mack about 3 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 pageRegarding 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" ?
Updated by Marco H about 3 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.
Updated by Filipe DA COSTA almost 3 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?).
Updated by Markus Klein about 2 years ago
- Related to Bug #92775: Preview of a page in an additional language fails if default and localized page is hidden added
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Susanne Moog over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 495c779938df833702406e5e887270c61b4b59c4.
Updated by Gerrit Code Review over 1 year 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
Updated by Susanne Moog over 1 year ago
- Status changed from Under Review to Resolved
Applied in changeset 6f5f1d9c8e7a47b5a37806fd8b0a8ba8609fddfe.