[TYPO3] cooluri - strange behaviour on multidomain site

Steffen Gebert steffen at steffen-gebert.de
Sat May 17 14:27:40 CEST 2008


> but bad news i guess. it only worked for a short time fro me.
> the i realized that i again got URLs in my LinkManager without domain 
> prefixes.

Strange.. We also have many index.php?id=XX links on
http://www.fw-bayern.de/fw-vor-ort/ which caused problems before the patch
and now work perfect.

I just remember a problem with requests to http://fw-bayern.de/ (without
www.) which also caused a problem for some time (don't remember good
enough).
Do you have the following two domain records:
* www.mydomain.com
* mydomain.com, redirected to http://www.mydomain.com/, [X] Transfer
parameters to Redirect URL, Status Code 301 (fields provided by ext
jb_status_code).


@Jan
I found the problem for the failed sql queries. In fact $id is not alway
numeric, e.g. if requested URI is
"index.php?id=ht__://phonefamily._c_h_a_t_._r_u_/images?" (_ added by me.
Don't want to advertise for them ;-).
But furthermore there are also "good" requests where id is the alias of a
page, e.g. http://www.fw-bayern.de/index.php?id=schrobenhausen . This also
causes an error in log, but works because cooluri isn't needed for this.

So I'd prefer to patch the line in class.tx_cooluri.php:getDomain()
  while ($max>0 && $id) {
to
  while ($max>0 && is_numeric($id)) {

I will have a look if there further occur sql errors, but I think this
should help.

Steffen



More information about the TYPO3-english mailing list