Project

General

Profile

Actions

Bug #19401

closed

Problem with Base Href

Added by Luc Muller about 16 years ago. Updated over 14 years ago.

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

0%

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

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)


Related issues 2 (0 open2 closed)

Is duplicate of TYPO3 Core - Bug #17591: <base> tag produces text selection problems in IE6ClosedDmitry Dulepov2007-09-08

Actions
Has duplicate TYPO3 Core - Bug #17523: Property config.baseUrl and it's current construct may be incompatible with ExplorerClosedChris topher2007-08-11

Actions
Actions #2

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;

Actions #3

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.

Actions #4

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.

Actions #5

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.

Actions #6

Updated by Luc Muller about 16 years ago

Even with RealUrl enable ?

Actions #7

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/&quot;&gt;&lt;/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]
  1. fix "select text on relative positioned elements", and "operation aborted" bugs in IE6
    config.baseURL >
    page.headTag = <head><base href="http://www.example.com/&quot;&gt;&lt;/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/&quot; /></base>.
But this doesn't seem to bother IE6.

Actions #8

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.

Actions #9

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.

Actions

Also available in: Atom PDF