Hello,

I'm running Drupal 5.3 with pathauto 5.x-2.0. When a node is deleted from node/*/edit page, the URL alias created for that node is not getting deleted.

I have some 50+ alias in my DB for nodes that doesn't exists. How can I delete them?

Please help me.

Thanks in advance.

R. Kaja Mohideen
MyiStop.com | Free Blog Hosting

CommentFileSizeAuthor
#8 delete_not_path_admin.patch614 bytesgreggles

Comments

greggles’s picture

Title: Alias NOT removed when node is deleted ! » alias not removed when node is deleted
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

This isn't "critical" as far as I'm concerned - extra aliases don't cause any problems for your site, do they? There's also no need to shout in the subject (use of caps and exclamation point). Also, the "assigned" field is for the user who is working on finding a solution to the problem and creating a patch. So, if that's you, great, I look forward to the patch. If not, please un-assign yourself.

Now, that out of the way...I can't reproduce this bug.

Attempted steps to repeat:
1. Install Pathauto, leave all settings at default
2. Create a node
3. Delete the node

Expected results:
1. An alias is created after step 2
2. That alias is deleted after sttep 3

Actual results:
As expected.

Please respond with any additional configuration necessary to get the behavior that you describe.

kajamohideen’s picture

Hello greggles,

Thanks for your advice. I'm a beginner to Drupal & Related Stuffs.

You can re-produce this bug when you delete the node from node/*/edit page. I have tested this with Drupal 5.3.

Hope, this info is enough.

Thanks in advance,

R. Kaja Mohideen

kajamohideen’s picture

Assigned: kajamohideen » Unassigned
greggles’s picture

No problem, as you submit more issues it becomes more obvious how to use the settings.

I was not able to reproduce the problem as you describe it. Unless you or someone else can confirm and provide the exact set of instructions to reproduce I'm unable to work on this issue.

kajamohideen’s picture

Yes. I found the problem.

When the Admin (User: 1) or the Author of the node deletes the node, the Alias is removed. But when a user, with the permission to administer the content (a moderator), deletes a node - the Alias is not removed.

I didn't give "Administer Pathauto" to Moderator or Any User.

greggles’s picture

Status: Postponed (maintainer needs more info) » Active

Great, now I can see this. I'm not sure this is necessarily a pathauto problem, but we may want to fix it in Pathauto and then pursue the longer term solution in core.

kajamohideen’s picture

Ok.. Then, you'll provide the fix as a patch or It'll be released in next version of Pathauto ? Please update this issue, when the fix ready. I'll update in my site.

greggles’s picture

Title: alias not removed when node is deleted » on nodeapi delete try to delete the alias in case the user is not a path admin
Status: Active » Patch (to be ported)
StatusFileSize
new614 bytes

Here is a patch which I applied to DRUPAL-5--2 but which needs to be applied to HEAD.

For core, the problem is that the first thing that happens in path_nodeapi is a check to see if the user is a path admin, which kinda makes sense, but if they are not a path admin then the node alias should probably still be deleted.

kajamohideen’s picture

Oh!.. Thanks for the patch, dude.

I'll apply it and update this issue.

greggles’s picture

Status: Patch (to be ported) » Fixed

uh, I had a total copy paste bug that would make this not work - should have been $node->nid not $category->tid

Anyway - fixed in both 5.x-2.x and HEAD now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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