Bug #19401
closedProblem with Base Href
0%
Description
This bug is highly linked with this one : http://bugs.typo3.org/bug_view_advanced_page.php?bug_id=6301
the purpose is that the base href make some problems with IE6.
the other point if that depending on the doktype Base href should not be declared the same way.
e.g in html 4.01 it should be not have ending tag
<base href="" >
in XHTML it should be properly closed.
so this is correct
<base href="" > but
this is also correct
<base href="" ></base>
the second choice avoid IE to be messy.
so I suggest to render the base href of typo3 in accordance to the doktype used in the config.
(issue imported from #M9462)
Updated by Steffen Kamper about 16 years ago
there is a workaround for that:
Updated by Luc Muller about 16 years ago
the problem is that the solution provided is'nt correct.
it make some problems with link to anchor on the same page.
it's a problem with typolink that say that if there is no baseURL in the config it only give the anchor to the a href=""
and because the basetag is not set with the baseurl but customly links to anchors in the same page redirect to the homepage...
the it is
tslib_content line 5251
// If sectionMark is set, there is no baseURL AND the current page is the page the link is to, check if there are any additional parameters and is not, drop the url.
if ($sectionMark && !trim($addQueryParams) && $page['uid']==$GLOBALS['TSFE']->id && !$GLOBALS['TSFE']->config['config']['baseURL'])
[...]
$this->lastTypoLinkUrl = $sectionMark;
Updated by Luc Muller about 16 years ago
P.S. comments are closed on the news...
I think we should implement a per doktype baseHref.
Our team could provide a patch for this, but we got to be sure that it's going to be included in the core and that the core team is ok for that.
Updated by Luc Muller about 16 years ago
In the comments Dmitry Dulepov says that we can't provide invalid code.
He is correct for this but
either
<base href="" /> and <base href="" ></base> are corrects in Xhtml -> see validator
and for html 4.01
<base href /> is invalid it should be <base href >
so the only clean solution is to output differents base href depending on the doktype chosen and using <base href="" ></base> for Xhtml beacause it's the only one that doesn't mess with IE.
Updated by Dmitry Dulepov about 16 years ago
You do not need baseURL any more if you use TYPO3 4.2. Use config.absRefPrefix instead.
Updated by Andreas Dörler about 16 years ago
Dimitry posted on #17591the following fix for IE6:
[browser = msie][version < 7]
page.headerData.100 = TEXT
page.headerData.100 = <base href="http://example.com/"></base> [^]
[else]
config.baseTag = http://example.com/ [^]
[global]
But as the headerData is inserted after page.includeCSS, IE6 will not find the relative linked styles.
So you could either use config.absRefPrefix or do something like this to get the base tag into the first row after the head-tag:
[browser = msie] && [version = <7]- fix "select text on relative positioned elements", and "operation aborted" bugs in IE6
config.baseURL >
page.headTag = <head><base href="http://www.example.com/"></base>
[global]
This worked for me!
The only thing is, that some kind of source optimization (not sure were it happens exactly) add's another slash to close the base tag, e.g. <base href="http://www.example.com/" /></base>.
But this doesn't seem to bother IE6.
Updated by Dmitry Dulepov about 16 years ago
Luc Muller , if you know (or read) what config.absRefPrefix does, you know the answer to your question.
Updated by Chris topher over 14 years ago
Closed; configuration issue.
Sidenote: TYPO3 outputs valid XHTML. For making it output valid HTML4 if that is wanted, much more will be needed than changing one unclosed tag.