Translating the wrong page!

Vako - October 13, 2009 - 06:22
Project:Google Translate Links
Version:6.x-2.0-beta1
Component:Code
Category:bug report
Priority:normal
Assigned:Wicher Minnaard
Status:postponed (maintainer needs more info)
Description

When I am in a specific page and click on one of the flags, the GT lands me on another page with translation. wrong link is being sent to GT...? check it on www.keghart.com

#1

Wicher Minnaard - October 14, 2009 - 18:24
Assigned to:Anonymous» Wicher Minnaard

That's weird. The code that determines the current URL is this:

<?php
$url
= 'http'. ($_SERVER['HTTPS'] ? 's' : NULL) .'://'. $_SERVER['HTTP_HOST'] . request_uri();
?>

Very little magic.

Case study. If I go to
http://www.keghart.com/node/211 I get a GT link to http://www.keghart.com/archive/all/node/node/211?page=53,34. Could it be that some module or custom logic (the "archive" thing, perhaps?) is messing with $_SERVER['REQUEST_URI']?

#2

Vako - October 15, 2009 - 02:10

Thanks for the reply.
Today it's behaving differently. All pages are working fine for me for some weird reason. I even tried it with multiple browsers.
However, I think I found a bug. If the URL contains a space (%20) then the translation is sending us to the root /

e.g.: try translating this page: http://www.keghart.com/Rights%20of%20Peoples

If it also happens to you, then we should submit a bug report perhaps.

#3

Vako - October 15, 2009 - 02:24

Actually I found another link that is acting weird:
http://www.keghart.com/node/420 is going to /node/69 in GT. there are no spaces and where is the #69 coming from?

#4

Wicher Minnaard - October 17, 2009 - 10:56
Status:active» postponed (maintainer needs more info)

Truly weird. Then again, if request_uri() is not returning the right thing or some JS on your page is mangling stuff, all bets are off really. Setting this to 'postponed'. Maybe if some other user is having the same problems we can find a common cause but as it is now it seems to be specific to your setup.

 
 

Drupal is a registered trademark of Dries Buytaert.