t3lib_befunc::getViewDomain returns wrong or no domain
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.
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.
Updated by Jaume Prat over 12 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?
Updated by Georg Ringer about 12 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