I installed Global redirect 7.x-1,3-alpha1 to D7 beta 3. When I access front page everything goes fine, but when I try to acces any inner content it stucks in redirect loop.

I am also unable to access administrative overlay. Overlay opens, but it stays blank (I see only half transparent overlay background, but no page over it).

Comments

nadavoid’s picture

I encountered this too, when installing in Drupal 7 RC2. I tried the latest dev release, which was posted July 16, 2010, and it resolved this problem, and seems to work properly.

Bence’s picture

Same here: redirect loop.

Bence’s picture

Ok, same here, installed latest dev release, which was posted July 16, 2010, and it resolved this. Please remove the broken release from the stable (green background) area!

akalata’s picture

Status: Active » Reviewed & tested by the community

Dev release is working, please remove -alpha1 since it is broken.

dave reid’s picture

Category: bug » support
Status: Reviewed & tested by the community » Fixed

Please review existing issue in the module's queue to help get a new stable release out. There is nothing to RTBC here in this issue.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

MPeli’s picture

Version: 7.x-1.3-alpha1 » 7.x-1.x-dev
Status: Closed (fixed) » Active

I am using the latest version of Global redirect and if I enable the module I cannot access my Drupal 7 website because I get following error:

This web page has a redirect loop
The web page at http://example.fr/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/en/... has resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
Here are some suggestions:
Reload this web page later.
Learn more about this problem.
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

I use Google Chrome, firefox gives similar error.

To access the website, I have to manually turn off the module and run update.php

UPDATE system SET status=0 WHERE (filename LIKE 'sites/all/modules%' ) AND status=1 AND type='module'

MPeli’s picture

7.x-1.x-dev works fine only for my non-multilingual sites.
7.x-1.3 works for non-multilingual and multilingual sites.

Noe_’s picture

I have to disagree with you.

when I go to mysite/es it keeps redirecting me to mysite/es until I get Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.

See:

noe@HP-Pavilion-dv4:~/workspace/seo$ wget http://seo.local/es
--2011-07-02 15:11:22--  http://seo.local/es
Resolving seo.local... 127.0.1.1
Connecting to seo.local|127.0.1.1|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:22--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:22--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:22--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:22--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:23--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:23--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:23--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:23--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:23--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:24--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:24--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:24--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:24--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:24--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:25--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:25--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:25--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:25--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:25--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
--2011-07-02 15:11:25--  http://seo.local/es
Reusing existing connection to seo.local:80.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://seo.local/es [following]
20 redirections exceeded.

And this is with globalredirect 7.x-1.3

Noe_’s picture

This issue has been solved in 7.x-1.x-dev so I guess this is a non issue.

So I am a little confused by MPeli

7.x-1.x-dev works fine only for my non-multilingual sites.
7.x-1.3 works for non-multilingual and multilingual sites.

It is just the other way around:
7.x-1.3 works with non-multilingual sites
7.x-1.x-dev works for non-multilingual and multilingual sites

MPeli’s picture

Hi,

I am currently using both version of Global Redirect (7.x-1.3, 7.x-1.x-dev). I have got several websites running on Drupal 7. Some of them allow users to switch languages (without using i18n).

If I install dev version on my multilingual sites I get redirect loops. Non multilingual sites works fine with both versions of Global Redirect for me.

That is my experience.

Martin.

Noe_’s picture

hmmm, weird.

I found the 'bug' to be in lines 77 and 82. Here it is solved because I am running the 1.x-dev version but in the 1.3 version it says language_url_rewrite

  // Let the locale_language_url_rewrite_url() do it's magic, if preset.
  // TODO: Is this needed anymore?
  if (function_exists('locale_language_url_rewrite_url')) {
    // Note 1 : the locale_language_url_rewrite_url() takes path (by reference)
    //          as the first argument but does not use it at all
    // Note 2 : We use $request_path here as we want the path in an untouched
    //          form (current_path() gets modified by core)
    locale_language_url_rewrite_url($request_path, $options);
  }

Because the language_url_rewrite function does not exist (it is called locale_language_url_rewrite_url() in locale.module) this function never gets called, and the $request_path never gets updated.
This would become a problem in line 95 where the $request_path is checked with $prefix which aren't the same because $request_path would contain 'es' and $prefix would be empty, and therefore it calls a drupal_goto
And there we have the redirect.
But since it redirects without changing anything the next call would do exactly the same, and the same, and the same.

So that´s why I said it was exactly opposite of your problem.

jm.federico’s picture

Status: Active » Closed (duplicate)

This function is not needed anymore.
Actually $prefix is not needed anymore

Patch from #774950-7: Incompatible with hook_url_inbound_alter() fixes the language problem

Lines about language_url_rewrite() can be removed.

I'm marking this as a dup since the other fixes the problem.

gregor171’s picture

The problem is in Global redirect module: it redirects to default perfix over and over by adding prefix!

A quick way to solve this problem is to clear language prefix for default language by:

UPDATE languages SET prefix='' where language='en'

To disable all enabled modules:

UPDATE system SET status=0 WHERE (filename LIKE 'sites/all/modules%' ) AND status=1 AND type='module'

but after enabling them back, a problem will reaper!

Solution from Noe didn't work for me!

Masala’s picture

The same bug with 7.x-1.4
How to remove it all now?!
sql reqest for disable and clear cache
UPDATE system SET status='0' WHERE name='globalredirect';
DELETE FROM cache_bootstrap WHERE cid='system_list'

its now work fine!