Google Translate Redirection Problems

Brett Haranin - March 2, 2008 - 15:34
Project:Google Translate
Version:5.x-1.4
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:needs review
Description

After using the google translate module successfully for several days, it suddenly stopped working. The problem appears to be related to a change in the IP address of the translate service.

The last release includes the google translate url as: translate.google.com
The cvs head includes the url as an IP: 64.233.179.104
Both of these occasionally issue a 302 redirect to: 209.85.135.104 (2/29/2008 and 3/1/2008)

Currently, the google translate module does not follow the redirection. When faced with a 302, it fails the strlen($content) > 30 test and the page is displayed in the default language. This may be the source of many of the issues currently open for the module.

AttachmentSize
redirectionHandling.patch5.77 KB

#1

Brett Haranin - March 3, 2008 - 13:05
Assigned to:Brett Haranin» Anonymous

#2

Brett Haranin - March 5, 2008 - 01:03
Version:HEAD» 5.x-1.4

#3

drutube - March 12, 2008 - 07:09

When I applied this patch again 5.x-1.4 I got

Hunk #1 succeeded at 126 (offset -2 lines).
Hunk #2 FAILED at 202

When it is applied to 5.x-1.3 it worked. This patch makes the module work -- sort of. Before applying the patch the module didn't do anything. There have been numerous similar bug reports. While the module still needs much work this patch is a good first step.

I'm attaching the patched module here. Remember the patch is again 5.x-13 not the current release.

AttachmentSize
gtrans.module.txt 7.25 KB
 
 

Drupal is a registered trademark of Dries Buytaert.