Bug #30892

t3lib_befunc::getViewDomain returns wrong or no domain

Added by Thomas Pilgaard Carlsen almost 8 years ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2011-10-13
Due date:
% Done:

100%

TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Issue 1:
If the TYPO3 BE hostname is not configured as a sys_domain record t3lib_befunc::getViewDomain will always return TYPO3 BE hostname and not the first domain of the root line of the page which is being previewed.

Issue 2:
If the TYPO3 BE hostname is configured as a sys_domain but the current root line does not contain a valid domain record t3lib_befunc::getViewDomain will return only 'http://' ie. no domain. I would think the logical thing would be to return the TYPO3 BE hostname.

class.t3lib_befunc.diff View (1.03 KB) Jaume Prat, 2011-10-18 16:27

t3lib_befunc.diff View - Diff-patch (1.01 KB) Jaume Prat, 2011-11-21 22:54


Related issues

Related to TYPO3 Core - Bug #34820: t3lib_befunc::getViewDomain does not respect http/https scheme Closed 2012-03-14

Associated revisions

Revision bfda58ca (diff)
Added by Jaume Prat over 7 years ago

[BUGFIX] t3lib_BEfunc::getViewDomain() returns wrong or no domain

If the TYPO3 BE host name is not configured as a sys_domain record
t3lib_BEfunc::getViewDomain() will always return TYPO3 BE host name
and not the first domain of the root line of the page which is
being previewed.

Furthermore, if the TYPO3 BE host name is configured as a sys_domain
but the current root line does not contain a valid domain record,
t3lib_BEfunc::getViewDomain() will return only 'http://' ie. no domain.

Change-Id: I8118d2c932b2a9d6c3d2dae51c5707a6371784d8
Fixes: #30892
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/6830
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
Reviewed-by: Dmitry Dulepov
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog

Revision 678b01b7 (diff)
Added by Jaume Prat over 7 years ago

[BUGFIX] t3lib_BEfunc::getViewDomain() returns wrong or no domain

If the TYPO3 BE host name is not configured as a sys_domain record
t3lib_BEfunc::getViewDomain() will always return TYPO3 BE host name
and not the first domain of the root line of the page which is
being previewed.

Furthermore, if the TYPO3 BE host name is configured as a sys_domain
but the current root line does not contain a valid domain record,
t3lib_BEfunc::getViewDomain() will return only 'http://' ie. no domain.

Change-Id: I5290ac965234fad7e8980e84a13ec5877f5119fc
Fixes: #30892
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/9319
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers

Revision 09ef6f69 (diff)
Added by Jaume Prat over 7 years ago

[BUGFIX] t3lib_BEfunc::getViewDomain() returns wrong or no domain

If the TYPO3 BE host name is not configured as a sys_domain record
t3lib_BEfunc::getViewDomain() will always return TYPO3 BE host name
and not the first domain of the root line of the page which is
being previewed.

Furthermore, if the TYPO3 BE host name is configured as a sys_domain
but the current root line does not contain a valid domain record,
t3lib_BEfunc::getViewDomain() will return only 'http://' ie. no domain.

Change-Id: I12f2fa3aaee785e4577a93a61aad3b136ae03756
Fixes: #30892
Releases: 4.7, 4.6, 4.5
Reviewed-on: http://review.typo3.org/9317
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter

History

#1 Updated by Jaume Prat almost 8 years ago

I have a similar problem with my TYPO3 project. I needed to fix the class t3lib_befunc in core.

I'm looking forward to your feedback.

#2 Updated by Jaume Prat almost 8 years ago

  • Assignee set to Christian Kuhn

#3 Updated by Christian Kuhn almost 8 years ago

  • Assignee deleted (Christian Kuhn)

#4 Updated by Jaume Prat almost 8 years ago

This patch is the correct and solves the problem. Please ignore the last one

#5 Updated by Jaume Prat almost 8 years ago

Steps To Reproduce this issue:

With a multidomain Webpage(s) in one TYPO3-Instance:

  • add more than 1 domain in your Rootpage, for example:
  • put domain1 at the first position
  • in Backend with domain2 (www.domain2.com/typo3) try to preview a page.

You will be always redirect to domain1 (!)

With this patch you will be redirect to domain2 if you try to preview a page with domain2 and search if domain2 exist in your rootline.

Could anybody try this patch?

THX!

#6 Updated by Mr. Jenkins almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 of change I8118d2c932b2a9d6c3d2dae51c5707a6371784d8 has been pushed to the review server.
It is available at http://review.typo3.org/6830

#7 Updated by Steffen Gebert almost 8 years ago

  • Assignee deleted (TYPO3 Release Team)
  • Target version deleted (4.6.1)

#8 Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6830

#9 Updated by Georg Ringer almost 8 years ago

is it possible that this is still not fully fixed?

My page tree:

. Tree 1 < -- Domain: fo.local
... Tree 1b
. Tree 2 < -- Domain: trunk.local
... Tree 2b

My backend domain: trunk.local and if i am on page "Tree 1b" I still get the trunc.local as preview domain but this should be fo.local as trunk.local is only valid for the other page tree.

problem is imo because ::getDomainStartPage() will deliver a result for trunk.local but first there should be a check if this domain is valid for the current rootline

#10 Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6830

#11 Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6830

#12 Updated by Gerrit Code Review over 7 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/6830

#13 Updated by Jaume Prat over 7 years ago

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

#14 Updated by Gerrit Code Review over 7 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9317

#15 Updated by Gerrit Code Review over 7 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/9319

#16 Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/9319

#17 Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/9319

#18 Updated by Gerrit Code Review over 7 years ago

Patch set 2 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9317

#19 Updated by Gerrit Code Review over 7 years ago

Patch set 4 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/9319

#20 Updated by Jaume Prat over 7 years ago

  • Status changed from Under Review to Resolved

#21 Updated by Gerrit Code Review over 7 years ago

  • Status changed from Resolved to Under Review

Patch set 3 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/9317

#22 Updated by Jaume Prat over 7 years ago

  • Status changed from Under Review to Resolved

#23 Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF