Hello,

How can I know if Global Redirect is working? I tried entering www.mysite.com/en/node/1 and the URL does not changed, it didn't redirect to the correct url. I already enabled all the settings on Global Redirect.
I'm also using i18n(Internationalization module).

Thanks in advance.

Comments

10basetom’s picture

This also doesn't appear to work for me in "real time". After I added a new post, I can see that an alias was added for this node, but from the home page whenever I click on the new node I still get the URL with "node" in it -- it seems the pretty URL doesn't kick in. In order for it to work, I have to manually "bulk update" the aliases, which is not practical.

UPDATE: Everything seems to be working fine again. I'm not sure what fixed it, but I did two things: (1) cleared the Drupal caches, and (2) disabled and then re-enabled the Redirect module (not sure it it has a known conflict with Global Redirect).

cstony0917’s picture

Version: 7.x-1.x-dev » 7.x-1.3
Assigned: Unassigned » cstony0917

I got the same problem with you this is my site

http://waaagh.ws/en/article/i-met-her the english page

http://waaagh.ws/article/%E6%88%91%E8%88%87%E5%A5%B9%E7%9A%84%E7%9B%B8%E... the chinese

and the node with english still working

http://waaagh.ws/node/94

mjgruta’s picture

Title: Global Redirect not working? » Global Redirect not working with i18n?
Version: 7.x-1.3 » 7.x-1.x-dev
Assigned: cstony0917 » Unassigned

I guess this is a conflict with i18n.

mjgruta’s picture

Title: Global Redirect not working with i18n? » Global Redirect not working with i18n
Component: Miscellaneous » Code
Category: support » bug
Priority: Normal » Critical
Issue tags: +i18n compatibility
betoscopio’s picture

subscribing

floown’s picture

subscribing

dr1ss’s picture

subscribing

lathan’s picture

We only have the core modules -> Locale and Content translation enabled this issue is present nothing todo with i18n.

here is another example http://www.golegal.co.za/node/151 should be going to http://www.golegal.co.za/content/preparing-questions-interview

michaek’s picture

I don't know any details about this module, but it does say on the module page that it can't work with i18n, or anything else that uses Custom URL Rewriting.

lathan’s picture

@michaek this is one of those modules that is a defacto' for almost any drupal shop out there... the only mention i see of i18n on the front page is this

Multilingual sites should thoroughly check their site after enabling this module. There have previously been known issues with i18n causing redirect-loops and such. I believe these have been fixed, but please take care.

which tends to indicate it should work with it... and it dose with Drupal 6.

gael_kl’s picture

subscribing

rolfmeijer’s picture

subscribe

korund’s picture

subscribe

r8r8r’s picture

Same problem on a mint 7.8 installation.

Modules enabled:

  • Internationalization 7.x-1.1
  • Pathauto 7.x-1.0-rc2
  • Global Redirect 7.x-1.3

languages:

  1. German - no path prefix (default)
  2. English - path prefix "/en"

settings:

  • Pathauto: Default path pattern = [node:title]
  • Global Redirect -- enabled: Deslash, Non-clean to Clean, Case Sensitive URL Checking, Language Path Checking, Add Canonical Link, Set Content Location Header, Taxonomy Term Path Handler

nodes:

  1. German, should be http://example.com/seite-eins-de
  2. English, should be http://example.com/en/page-one-en

scenarios:

  1. http://example.com/seite-eins-de -- correct page, but throws the error below

    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_NONE - assumed 'LANGUAGE_NEGOTIATION_NONE' in globalredirect_init() (line 145 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH_DEFAULT - assumed 'LANGUAGE_NEGOTIATION_PATH_DEFAULT' in globalredirect_init() (line 146 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH - assumed 'LANGUAGE_NEGOTIATION_PATH' in globalredirect_init() (line 147 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_DOMAIN - assumed 'LANGUAGE_NEGOTIATION_DOMAIN' in globalredirect_init() (line 167 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).

  2. http://example.com/node/1 -- correctly redirects to http://example.com/seite-eins-de, but throws the error below

    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_NONE - assumed 'LANGUAGE_NEGOTIATION_NONE' in globalredirect_init() (line 145 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH_DEFAULT - assumed 'LANGUAGE_NEGOTIATION_PATH_DEFAULT' in globalredirect_init() (line 146 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH - assumed 'LANGUAGE_NEGOTIATION_PATH' in globalredirect_init() (line 147 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_DOMAIN - assumed 'LANGUAGE_NEGOTIATION_DOMAIN' in globalredirect_init() (line 167 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_NONE - assumed 'LANGUAGE_NEGOTIATION_NONE' in globalredirect_init() (line 145 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH_DEFAULT - assumed 'LANGUAGE_NEGOTIATION_PATH_DEFAULT' in globalredirect_init() (line 146 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH - assumed 'LANGUAGE_NEGOTIATION_PATH' in globalredirect_init() (line 147 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_DOMAIN - assumed 'LANGUAGE_NEGOTIATION_DOMAIN' in globalredirect_init() (line 167 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).

  3. http://example.com/page-one-en -- correct behavior: Page not found (Drupal 404)
  4. http://example.com/en/page-one-en -- Firefox redirect error (this used to work before i installed Global Redirect)
  5. The page isn't redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    This problem can sometimes be caused by disabling or refusing to accept cookies.

  6. http://example.com/node/2 -- no redirect, but displays the correct, english page with the following errors:

    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_NONE - assumed 'LANGUAGE_NEGOTIATION_NONE' in globalredirect_init() (line 145 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH_DEFAULT - assumed 'LANGUAGE_NEGOTIATION_PATH_DEFAULT' in globalredirect_init() (line 146 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_PATH - assumed 'LANGUAGE_NEGOTIATION_PATH' in globalredirect_init() (line 147 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).
    Notice: Use of undefined constant LANGUAGE_NEGOTIATION_DOMAIN - assumed 'LANGUAGE_NEGOTIATION_DOMAIN' in globalredirect_init() (line 167 of /Users/foobar/dev/testproject/sites/all/modules/globalredirect/globalredirect.module).

  7. http://example.com/en/node/2 -- Firefox redirect error

    The page isn't redirecting properly
    Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
    This problem can sometimes be caused by disabling or refusing to accept cookies.

I hope this helps and points to the right direction!

sun-fire’s picture

Subscribe. The same.

v.kopitsa’s picture

subscribe

develway’s picture

Global Redirect don't work with internalization!
subscribing!

typoagrafka’s picture

Subscribing

devth8’s picture

subscribe

nicholasThompson’s picture

But i18n has Locale as a dependency. Those errors imply that locale.inc hasn't been included, which it is via locale_init...

nicholasThompson’s picture

GlobalRedirect is configured to work with the core Translation module, however I haven't used i18n. is there ever a case where you'd have i18n enabled but not translation?

rolfmeijer’s picture

Content Translation and Locale are required by the Multilingual Content module from i18n.
I have all modules installed required for translating content:

  • Content Translation (core 7.10)
  • Locale (core 7.10)
  • Internationalization (7.x-1.2)
  • Multilingual Content (7.x-1.2)

and a few more, f.i.:

  • Path translation (7.x-1.2)
  • Translation sets (7.x-1.2)
Kristen Pol’s picture

It is working for me when I am using:

globalredirect - 1.4

and Language Path Checking turned on as long as I use the node/[nid] instead of the path alias. It works like:

* node/1 - English
* node/2 - French
* node/3 - German

If I go to /en/node/2 then it redirects to node/1. If I go to /de/node/2, it redirects to /de/node/3. For both cases, it uses the correct path aliases. If instead, I try to use the path alias, like /en/french-title then it doesn't work. Seems like it would be handy have it work for this case as well.

If I turn on i18n_redirect 1.2 (and i18n), then it still works the same way.

Kristen

Kristen Pol’s picture

I looked at the code and see why it won't work if you use the alias instead of node/[nid].

The issue is that the alias and the language in the URL don't match so the lookup won't find it. If you don't pass in a language (to the lookup function), then it will use the interface language which may or may not work depending on the situation. The only way to get it to do the "right" thing all of time would be to do a custom query to the database rather than rely on the built-in functions, but that is more inefficient so perhaps that is why it wasn't done. For example, adding this code before the existing language_redirect code will make it handle aliases as well:

  if ($settings['language_redirect'] && module_exists('translation') && 
    ! preg_match('/node\/([0-9]+)(\/.+|)$/', $current_path, $matches)) {
    // the current_path may be an alias
      $result = db_query('SELECT source FROM {url_alias} WHERE alias = :current_path', 
        array(':current_path' => $current_path));
    $alias = $result->fetchField();
    if (! empty($alias)){
      $current_path = $alias;
    }
  }

Kristen

uberblue’s picture

subscribing. Mint 7.12, Redirect, GlobalRedirect, i18n

batigol’s picture

Follow

Demoshane’s picture

Subscribe: i18n, global redirect

Installing newest release causes redirect loop on multilingual site rendering site unusable

Kristen Pol’s picture

@Demoshane - Do you have Language Path Checking turned on?

Kristen

Demoshane’s picture

No, but after upgrading it acts like it would have. Turning language path checking on does the same. It seems that after upgrading language path checking defaults on or something like that.

develway’s picture

This module is not compatible with some others, and some functions, but in total 7.x-1.4 works perfectly Global Redirect

Markiz’s picture

Please, is there any progress with compatibility of Global Redirect and i18n?

Now, it is impossible to have frontpage address (on i18n site) www.example.com. It is always redirected to url www.example.com/[alias-of-front-page-node]. It is impossible to have url www.example.com. When global redirect is disabled, url of frontpage is www.example.com.

Thank You.

hedac’s picture

I'm having the issue of...
when the url alias is set to All Languages it is redirected correctly.
but when I have an alias for a language and another alias for another language,... then
the alias which is in the site language is working but the spanish translation... going to /es/node/xxx doesn't redirect to /es/alias only stays in /es/node/xxx

or maybe it is that it is working on the nodes that are source for translation... I need to check that.

djschoone’s picture

Lot's of people struggling with it. Critical imho! But no response or solutions from maintainer(s). How can we solve this?

marcoka’s picture

@djschoone, i myself have a textfile with tons of issues where i used patches from, so i can keep track of stuff i am using on my sites :)
so basically thats the only thing you can do when no maintainer commits it to a release.

wizonesolutions’s picture

Hey, new co-maintainer...trying to understand what's going on with all the subtly-different issues. I had thought this was fixed in 7.x-1.x-dev. How does it differ from the one that is? Rather than a redirect loop, it is simply not redirecting under some cases?

An issue summary would be great.

wizonesolutions’s picture

Hey, new co-maintainer...trying to understand what's going on with all the subtly-different issues. I had thought this was fixed in 7.x-1.x-dev. How does it differ from the one that is? Rather than a redirect loop, it is simply not redirecting under some cases?

An issue summary would be great.

Kristen Pol’s picture

Thank you @wizonesolutions for digging into this... it really needs to be fixed (obviously)...

If anyone can add steps to reliably reproduce the issue, that would be huge!

djschoone’s picture

Haven't found the exact combination of factors yet. If i do i'll let you know! Great you're stepping up!

giorgio79’s picture

There are lot of issues mixing here, so I raised a separate one for endless loop at #1862886: Endless redirect loop when " Language Path Checking" enabled and i18n_redirect is used

I managed to reproduce the issue on a site where "Path prefix language code" was omitted for the default English language, while on another site with path prefix "en" for default english Global redirect language redirect worked fine without i18n redirect and i18n node (multilingual content).

beto_beto’s picture

hi am using drupal 6 for multi language now when i copy the article url to any social page like twitter or facebook pages it give me charachter like this 2%D9%8A%D i don't find a solution for that can any one please help me

haggins’s picture

Issue summary: View changes

Same here. node/123 is not redirected to its alias.

Core 7.28

Used modules:

globalredirect 7.x-1.5
i18n 7.x-1.11

edit: it works now!

As node/123 is not in the default language, I had to add the language, ie: en/node/123

RavindraSingh’s picture

I recommend you to upgrade your module to globalredirect 7.x-1.5 release. Issues doesn't exist there.

rezarad’s picture

Component: Code » SimpleTest
Assigned: Unassigned » rezarad
Category: Bug report » Task
Priority: Critical » Normal
Status: Active » Closed (fixed)
aufumy’s picture

globalredirect 7.x-1.5 did not work for me.

Enabling multilink project worked instead.

Besides redirecting the node ids to the clean url, it would also take into consideration what language you chose for the website currently, if you typed in the node id of an alternate language page, it would redirect you to the equivalent page in your current language.