I noticed today that on my site, Global Redirect does not appear to be working at all. Pages that are located at URLs like "/node/186" are not being redirected to their pathauto equivalents. So for an example, if you navigate to http://www.gigindie.com/node/186 you should be redirected to http://www.gigindie.com/venue/cafe-coda-chico. Similarly, http://www.gigindie.com/taxonomy/term/26/ does not redirect to http://www.gigindie.com/blog/tag/albums and http://www.gigindie.com/user/421/ does not go to http://www.gigindie.com/users/janafisher. Additionally, trailing slashes are not being removed, etc.

I haven't tagged this as a major issue since I'm not sure if others are experiencing it. Any suggestions? Could it be a conflict with something else?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mrweiner’s picture

Title: Not redirecting to pathauto urls » Module not functioning

When I first wrote my post I thought that only pathauto URLs weren't working, so that was the title. Just realized I forgot to change it after adding some more info about the issue.

mrweiner’s picture

Priority: Normal » Major

I was hoping that just posting the issue would get it some attention, but since the module is still completely broken on my site, I'm changing the status to major. Any input on the matter would be greatly appreciated.

kemitix’s picture

I'm having the same issue. Could your problem be caused by this issue http://drupal.org/node/304025

mrweiner’s picture

Nope, doesn't look that way. It's not installed in a subdirectory, and I'm not on D6 either.

TelFiRE’s picture

Yep, mine is completely non-functional too and a quick look around shows a whole lot of people having the same problem :/

mrweiner’s picture

For anybody who comes across this, take a look at #905914: Merge global redirect functions into Redirect module. Although it does not solve the problem for Global Redirect, they are working on implementing its features into the Redirect module. The most recent patch in there appears to provide most of the functionality performed by Global Redirect. It's a work in progress, so obviously its not finished or the best it could be, but it is certainly on its way.

It's also better than nothing, which is what I have at the moment with Global Redirect. ;)

ben.denham’s picture

I have been experiencing the same issue.

It appears that after the call to drupal_alter on line 80 of globalredirect.module, $request_path (which should be the entered path, i.e. node/123) is being set to the new, correct alias.
The test on line 217 then checks that $request_path is not equal to the retrieved alias, otherwise it deems the redirect unnecessary.

It appears to me that path_alias_xt_url_outbound_alter() in the Extended Path Alias module is changing the $request_path into the alias.

I have attached a quick patch that removes the call to drupal_alter, thereby eliminating the apparent conflict with the Extended Path Alias module (and perhaps other modules).

However, I'm not sure of what effect this may cause (especially to sites with different languages, based on the comments next to the drupal_alter), but it appears to restore basic redirection functionality.

phiscock’s picture

Thank you. I was having this problem even with Extended Path Alias uninstalled. The patch seems to have solved my problems.

fox_01’s picture

Patch worked for me, too.

jesss’s picture

The patch in #7 didn't work for me. node/xxx still isn't redirecting to pretty-alias.

nicholasThompson’s picture

Priority: Major » Critical

Remarking out drupal_alter isn't really a solution - but it's interesting it is causing a problem.

I'll try to take a look ASAP.

MO-2’s picture

Patch in #7 worked for me.

plusproduit’s picture

#48 seems to work but fires a notice with language path

RavindraSingh’s picture

Issue summary: View changes

Can someone explain steps to reproduce? I am also trying to replicate in 7.x-1.5 as describe in issue summary but not able to reproduce.

Marc DeLay’s picture

Status: Active » Closed (cannot reproduce)

@mrweiner is this still an issue for you?

Going to the example urls in your report redirect me to the alias urls so it seems like this issue is resolved.

Please reopen if this is not correct.