This bug is related to https://drupal.org/node/841044

If you add a file, the module creates an alias correctly for the file. However, if you delete the file or node, the corresponding alias will not be removed.

D7 provides hook_file_delete, which can be used to delete the path. I will provide a patch shortly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dpintats’s picture

Having a crazy time with the patch, mostly because of https://drupal.org/node/1909040. The module file is saved in dos format, so the git diff is producing a file with mac line endings. Therefore this patch only applies via traditional patching: patch -p1 < file_aliases-delete-alias-with-file-2256545.patch

Sorry about this, but it will need to be updated once the unix issue is committed to the project...

dpintats’s picture

Assigned: dpintats » Unassigned
dpintats’s picture

Aaaaaand I realized just now that this fix was already applied to the comprehensive patch mentioned in my post....hours of work for nothing. Anyway, isolated patch here anyway.

Deciphered’s picture

Status: Active » Fixed

Thanks for the patch, fixed and committed.

  • Deciphered committed bce0360 on 7.x-1.x
    #2256545 by dpintats, Deciphered: Fixed deletion of URL alias.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajiv.singh’s picture

Enabled patch #1 for language based URL aliases