Closed (duplicate)
Project:
URL Alias
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Mar 2012 at 19:06 UTC
Updated:
22 Mar 2012 at 14:49 UTC
// We only care when there is a url callback and aliases are present.
if (empty($entity->url_alias) || !isset($info['uri callback'])) {
return FALSE;
}
$callback = $info['uri callback'];
$uri = $callback($entity);
$path = $uri['path'];
// Delete existing aliases.
path_delete(array('source' => $path));
If I create an alias, deploy, remove the alias and deploy again. The alias won't be removed from the destination server.
We can rearange the code so it will take in to account this situation.
// We only care when there is a url callback and aliases are present.
if (!isset($info['uri callback'])) {
return FALSE;
}
$callback = $info['uri callback'];
$uri = $callback($entity);
$path = $uri['path'];
// Delete existing aliases.
path_delete(array('source' => $path));
if (empty($entity->url_alias) {
return FALSE;
}
Comments
Comment #1
aspilicious commentedI fixed this in http://drupal.org/node/1494428