Project

General

Profile

Actions

Bug #83973

closed

Unable to preview pages on backend domain for multi-site domains (returns 404 code)

Added by Linus Stubert about 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-02-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

On multi-domain sites, if I set TCEMAIN.previewDomain to the backend domain and there is no domain record for the backend domain present in the site root of the selected page, I receive a 404 code when I try to preview the page (I would like to use the same backend domain across all sites, so that I am able to preview any hidden page as long as I have the necessary permissions).

I am also unable to add a domain record for my single backend domain to each of the sites, as the domain names have to be unique to a specific domain record.

The reason I do not want to preview the pages on their "actual domains" is because on domains different from the backend domain the browser is not able to access the backend session information (due to same-origin policy) and therefore I am unable to preview hidden pages this way.

I am not sure if this behaviour is a bug or by design, however it makes handling multi-domain sites very troublesome, as I have to log in for each of the domains to preview hidden pages, even if I have full admin permissions in the backend. Or am I missing some trivial solution to my problem?

Actions #1

Updated by Michael Stucki almost 6 years ago

  • Project changed from 9 to TYPO3 Core
  • TYPO3 Version set to 9

Wrong project. (Sorry, didn't notice until now.)

Actions #2

Updated by Ruud Silvrants almost 5 years ago

Michael Stucki wrote:

Wrong project. (Sorry, didn't notice until now.)

In the FrontendRestrictionContainer the check disabled restriction is made to the tableName 'pages', bu tnot applied to 'pages_language_overlay'.

With the additional check (for version 8) this solved the issue:
```
public function buildExpression(array $queriedTables, ExpressionBuilder $expressionBuilder): CompositeExpression {
$constraints = [];
/** @var TypoScriptFrontendController $typoScriptFrontendController */
$typoScriptFrontendController = $GLOBALS['TSFE'];
foreach ($this->restrictions as $restriction) {
foreach ($queriedTables as $tableAlias => $tableName) {
$disableRestriction = false;
if ($restriction instanceof HiddenRestriction) {
// If display of hidden records is requested, we must disable the hidden restriction.
$disableRestriction = $tableName === 'pages' || $tableName =='pages_language_overlay' ? $typoScriptFrontendController->showHiddenPage : $typoScriptFrontendController->showHiddenRecords;
}
if (!$disableRestriction) {
$constraints[] = $restriction->buildExpression([$tableAlias => $tableName], $expressionBuilder);
}
}
}
return $expressionBuilder->andX(...$constraints);
}
```

Actions #3

Updated by Georg Ringer about 4 years ago

  • Status changed from New to Closed

Thanks for creating the issue. Actually there is currently no other way then logging into the backend in the multiple domains because the cookie belongs to that site.

Furthermore with 10.0 and the patch #87193 the setting previewDomain has been removed in favor of the site handling which is now required for 10. Therefore I am closing this issue.

Actions

Also available in: Atom PDF