I have a 70+ microsite Drupal install which is making good use of the family of Domain modules. They have been great for the most part, however a bug popped up recently which I can't seem to get down to the bottom of. On a few CCK types on certain sub-domians, when I go to add a new node the path for the new node it defaults to http://foo.domain.com/Array.

I am assuming this has something to do with tokens and the domain path module interfering with the pathauto module. The interesting thing is that there is still an alias created in pathauto. If I add a path into the domain path area on the node it overwrites /Array.

Any ideas on how I can make sure an admin doesn't get /Array as a path or any ideas of what could be causing this?

Thanks for your help, you're modules are a great contribution to the community.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

HelloStephanie’s picture

Issue summary: View changes

grammar correction

agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Not sure. What path gets saved in {url_alias}? What token(s) are you using?

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)
HelloStephanie’s picture

I'm still having an issue with this /Array issue.

When a microsite admin makes a new page, usually the pathauto alias is saved. Sometimes, however, Drupal skips the pathauto alias and defaults to what is in Domain Path (which might be empty) creating the /Array path issue. At least this is my understanding of what's going on.

This issue has been truly perplexing so any hunches you might have about it would be greatly appreciated. Most paths are in the format name/[title] under pathauto settings.

HelloStephanie’s picture

Status: Closed (cannot reproduce) » Active
agentrickard’s picture

Status: Active » Postponed (maintainer needs more info)

Please answer the questions in comment 1.

HelloStephanie’s picture

In {url_alias} the node/12440 is program/test-program

In {domain_path} node/12440 is empty

node/12440 defaults to /Array when you try to visit the page.

agentrickard’s picture

WHAT TOKENS ARE YOU USING?

Please include a screen capture of the Domain Path settings for node 12440.

Please provide the information requested so that I can try to help you.

agentrickard’s picture

Further, is there an empty entry in {domain_path} for this node, or _no_ entry? Those are two very different things.

HelloStephanie’s picture

As I said before, the only token I'm using is [title].

There is no entry for the node in {domain_path} -- sorry, I should have been more descriptive about that.

I've attached some screenshots of the settings on the node edit page for 12440. There is no Domain-specific path set so they are all empty.

agentrickard’s picture

Status: Postponed (maintainer needs more info) » Active

Sorry. I'm a little grumpy.

agentrickard’s picture

I can't seem to replicate the error. I'm not sure that it's coming from Domain Path.

You might try disabling the module -- or just disabling the functions domain_path_domainpath() and domain_url_alter() -- to see what happens.

grndlvl’s picture

Status: Active » Closed (fixed)

Over a month, closing for now. if it's still an issue feel free to re-open.

bryanzera’s picture

Component: Miscellaneous » Code
Status: Closed (fixed) » Patch (to be ported)
FileSize
453 bytes

After an exhaustive night of debugging with @stevector, we found the issue with the following code in domain_path_domainpath()

   $paths = domain_path_paths('nid', $nid);
   if (isset($paths[$domain_id])) {
     $path = $paths[$domain_id];

$paths contains an array of domain-specific paths keyed by nid. What ends up getting returned is the value of the $paths array keyed by the domain id, which gets translated by url() to /Array.

This only occurs when:
- you have a domain whose id is the same as an existing nid AND
- the node referenced by that nid has a domain_specific path.

Attached is a small patch to fix this. Caveat: No unit testing has been performed on this patch.

agentrickard’s picture

Status: Patch (to be ported) » Postponed (maintainer needs more info)

Why is this marked "to be ported"? What version is the patch really for?

agentrickard’s picture

Issue summary: View changes

grammar fix

i-trokhanenko’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

Closing a Drupal 6 issue. It's time. Thanks!