I discovered a very rare bug (it seems to be a module conflict but I have not nailed it down) in which sorting your images (or editing a title, caption) after the initial upload/save will remove the path alias and revert it to node/####

Not sure what the problem is but a temporary solution is updating hook_nodeapi in node_gallery.module with this additional case:

case 'presave':
      // About to be saved (before insert/update)
      if (module_exists('path') && !isset($node->path)) {
        // There is a rare bug in which that path aliases will be deleted when
        // editing an image via "Manage Images" / "Sort Images"
        // This only happens on complex sites
        
        if (in_array($node->type, (array)node_gallery_get_types('image'))) {
          // Only do this check on node gallery image nodes
          $language = isset($node->language) ? $node->language : '';
          $path = 'node/'. $node->nid;
          $alias = drupal_get_path_alias($path, $language);
          if ($path != $alias) {
            $node->path = $alias;
          }
        }
      }
      break;

Comments

kmonty’s picture

Assigned: Unassigned » kmonty
dddave’s picture

Is this still relevant? Or can we close this issue?

dddave’s picture

Status: Active » Closed (fixed)

Educated guess...