Feature #36542

Changed domain handling on "View webpage" from backend causes problems

Added by Sybille Peters over 7 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
Start date:
2012-04-25
Due date:
% Done:

100%

PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Due to fix for Bug #30892:

This new behaviour causes problems for us.

For a long time (due to bug or not) the domain currently used in the backend was used for loading a page with "View webpage". Due to the change in getViewDomain, the first domain from the domain records is now used.

On multi-site installations we use a generic domain for working in the backend and this should be consistent with the domain used for viewing the page from the backend.

We now have to patch the core or completely change handling.

Ideal would be to make this configurable !!!


Related issues

Related to TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https scheme Closed 2012-03-14
Related to TYPO3 Core - Bug #35392: Preview links not working if BE is using SSL and websites aren't Closed 2012-03-30

Associated revisions

Revision ccf7dae5 (diff)
Added by Wouter Wolters over 4 years ago

[BUGFIX] Double protocol when using TCEMAIN.previewDomain

In EXT:viewpage the option TCEMAIN.previewDomain is used but
not evaluated correctly. The option can contain the protocol
already and this is not respected in EXT:viewpage.

Check if domain already contains a protocol.

Resolves: #34820
Resolves: #36542
Resolves: #23115
Releases: master, 6.2
Change-Id: I13f7cda1dca54d60d350ba460e43ec924c140d35
Reviewed-on: http://review.typo3.org/41095
Reviewed-by: Helmut Hummel <>
Tested-by: Helmut Hummel <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>

Revision b438ca6d (diff)
Added by Wouter Wolters over 4 years ago

[BUGFIX] Double protocol when using TCEMAIN.previewDomain

In EXT:viewpage the option TCEMAIN.previewDomain is used but
not evaluated correctly. The option can contain the protocol
already and this is not respected in EXT:viewpage.

Check if domain already contains a protocol.

Resolves: #34820
Resolves: #36542
Resolves: #23115
Releases: master, 6.2
Change-Id: I13f7cda1dca54d60d350ba460e43ec924c140d35
Reviewed-on: http://review.typo3.org/41122
Reviewed-by: Wouter Wolters <>
Tested-by: Wouter Wolters <>
Reviewed-by: Christian Kuhn <>
Tested-by: Christian Kuhn <>

History

#1 Updated by Philipp Gampe over 7 years ago

Why would you preview with a wrong domain? Can you provide a usecase for using a different domain for previewing the content, then for actually publishing the content?

#2 Updated by Sybille Peters over 7 years ago

use case #1: using a reverse proxy for HTTPS. All backend access is redirected via the reverse proxy changing all the URLs from www.domain1.de to secure.domain.de/www.domain1.de etc.

use case #2: www.domain1.de, www.domain2.de, www.domain3.de are all hosted on a single TYPO3 installation. Some users have access to only one domain, some have access to all domains. In this case, it is best to access the backend via a common domain e.g www.alldomains.de.

If this is not made clear, I am happy to elaborate via private email.

#4 Updated by Ruth Schwarzenbach over 7 years ago

We have the same problem. We have an "intern" domain for the backend and several domains for the frontend user and now every time when we view in backend the domain from domain record is taken and there're a lot of redirects...We would prefer the baseurl.

#5 Updated by Thor Solli over 7 years ago

We have the same problem with a client. We have one main domain for the admins and several "subdomains" for editors. Preview of a hidden page is somewhat tedious for admins logging in on the main domain.

#6 Updated by Mathias Schreiber almost 5 years ago

  • Target version set to 8 LTS

#7 Updated by Frank Gerards over 4 years ago

Hi,

any news on that ? The "take the first domain record" mechanism kicks in, when previewing a page in another domain node in a multidomain env.
BUT: It seems that the userTSconfig settings are NOT present, when previewing a hidden page in another domain node. Therefore, the user is sees a 404 page in the frontend.

#8 Updated by Wouter Wolters over 4 years ago

  • Status changed from New to Needs Feedback

Hi, there is an undocumented FEATURE to set an alternative previewDomain in PageTSConfig.

TCEMAIN.viewDomain = example.com

If you have your backend running on https and your frontend not you can specify a protocol in this setting.

TCEMAIN.viewDomain = http://example.com

Does this solve the problem?

#9 Updated by Sybille Peters over 4 years ago

Yes it solves the problem.

However, it should be:

TCEMAIN.previewDomain not viewDomain.

And, the protocol part does not work for me, so

TCEMAIN.previewDomain = blahblah.uni-hannover.de/etc

works fine (the current https protocol is used) but

TCEMAIN.previewDomain = https://blahblah.uni-hannover.de/etc

results in a URL

https://https//blahblah.uni-hannover.de/etc

being generated.

#10 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41095

#11 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41095

#12 Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/41122

#13 Updated by Wouter Wolters over 4 years ago

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

#14 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF