Running latest Global Redirect 7.x-1.5. Domain path works great with Domain Path 7.x-1.0-beta3 but when upgrading to Domain Path 7.x-1.0-beta4 causes infinite loops to occur. Backing down to beta3 everything works again. No errors logged in watchdog or apache httpd logs. Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Any debugging information other than that?

Steps to replicate?

trevorw’s picture

Sorry, have not other debugging information, nothing in watchdog logs or apache logs. I could gather more if I knew how and what to look for?

To replicate, we have a drupal site with multiple domains. Upgrading domain path to beta4 cause the loop, downgrading to beta3 fixed the loop. Using drupal 7.23, latest version of domain, domain_alias, redirect and globalredirect modules.

blacklabel_tom’s picture

Issue summary: View changes

Hi,

I've had this issue too, switching back to beta 3 fixed the issue for me,

As far as I can make out the updated domain_path_url_inbound_alter function in beta4 isn't giving up converting the path after it has been converted once like the beta3 does.

So for me my node was node/32 and the path was tom-test and printing out the oringinal path and the updated path would look something like this:

node/32
tom-test
node/32
tom-test
node/32
tom-test

After a while the browser would give up.

I hope this helps narrow down the bug here.

Cheers

Tom

davidrobinson_pw’s picture

I hit this problem as well.
It looks like there's a general problem with using hook_url_inbound_alter() and the global_redirect module
see this issue: https://drupal.org/node/774950
The last comment there suggests that hook_url_outbound_alter() should be implemented as well.

The basic hook would look like this:

/**
 * Implements hook_url_outbound_alter().
 */
function domain_path_url_outbound_alter(&$path, &$options, $original_path) {
    if ($alias = domain_path_lookup_path('alias', $original_path, NULL)) {
        $path = $alias;
    }
}

it needs fleshing out to support languages, handle the options array and use statics but this seems to be solving the problem at the moment for me.

davidrobinson_pw’s picture

Status: Active » Needs work
FileSize
459 bytes

I've added a patch for the very basic outbound alter.
Mostly so that I have something we can target in our own makefiles.

harrick’s picture

That patch seems to work up to a point. All works as expected for a while and then the infinite redirect kicks in again. I haven't established what causes it to revert back yet but it can be temporarily fixed by clearing the Drupal cache.

I appreciate that the patch was only a quick fix so hopefully these observations might help to flesh it out. I'll report back If I work out what the cause of the regression is.

seanB’s picture

Patch #5 seems to work for me. It happens in the following use case:
- You have a generic node (eg. node/12) with a automatic path '/about' for domain A
- You have another node (eg. node/15) and set the same alias '/about' as a domain path for domain B

I can't find the time to look further into this, but hopefully this helps.

Johan den Hollander’s picture

I confirm that this patch still applies.
Without the patch the module is unusable.

agentrickard’s picture

Incorrect. It is only not compatible with Global Redirect.

squarecandy’s picture

Patch #5 works for me to solve conflict w/ Global Redirect. Thank you!