The bit of code that checks to see if the pathauto path that is created during validation is a dupe(-# is added) only works if pathauto has set the $node->path variable which doesn't happen in validation. So this will cause the creation to validate but disallow a node update.
This only happens if you do not assign a domain specific value.
I am not sure if we should be checking this here, maybe just a notice? The path that would be assigned to the node is handled by pathauto already and just added a (-#).
if ($count) {
// If there are no aliases for the active domains, we have to ensure
// that this is not a duplicate alias.
$domains = array_filter($node->domains);
$set_paths = array_filter($paths);
if (empty($domains)) {
form_set_error('domain_path', t('The path alias is already in use. You may provide a domain-specific alias below.'));
$set_message = TRUE;
}
elseif (empty($set_paths)) {
foreach ($domains as $domain_id) {
$key = ($domain_id == -1) ? 0 : $domain_id;
form_set_error("domain_path][$key", t('The path alias %alias is already in use. You should provide a domain-specific alias.', array('%alias' => $alias)));
$set_message = TRUE;
}
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1483696-domain-path-validate.patch | 5.52 KB | agentrickard |
| #5 | 1483696-domain-path-validate.patch | 4.51 KB | agentrickard |
Comments
Comment #1
grndlvl commentedComment #2
agentrickardDoes this happen before or after applying the patch in #1412938: Allow domain path-auto support?
Comment #3
grndlvl commentedBefore, I commented all that out to be sure.
I can give steps to replicate later.
Comment #4
grndlvl commented[edit] doh! completely wrong issue...
Comment #5
agentrickardRight. Here's a patch to simplify all that. We had been checking to see if pathauto appends a numeric string to the end of the alias. I removed that.
Currently in client testing.
Comment #6
agentrickardSimplified patch.
Comment #7
agentrickardCommitted and pushed to beta4.