Update action "do nothing" should do more...

Gerhard Killesreiter - June 1, 2009 - 14:41
Project:Pathauto
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Description

If I chose "do nothing, leave the old alias intact" as the option for "update action", I expect that new aliases get created for nodes that do not yet have any aliases.

The code does not so that, though.

Attached patch fixes this.

AttachmentSize
pathauto.patch918 bytes

#1

herzbube - November 4, 2009 - 10:52

I'm on 6.x-1.2 (with Drupal 6.14), same issue.

#2

kentr - November 9, 2009 - 09:53

This looks like a duplicate of #285042: Bulk Update + "Do Nothing" Should Still create aliases for unaliased items. Cool that you made a patch. I think it would help others if you'd move the patch over to that thread if this is a duplicate.

Looking forward to testing the patch.

#3

Proct0t - November 14, 2009 - 18:45

worked fine for me, thanks!

#4

Proct0t - November 15, 2009 - 04:55
Status:needs review» needs work

wait, i take that back... the call to _pathauto_existing_alias_data() will return an empty $update_data when pathauto_update_action == 0, which will cause this patch to always believe the current alias to be non-existent... currently i simply copied the existing alias function to replace the call and moved "case 0" to just below "case 3"....

 
 

Drupal is a registered trademark of Dries Buytaert.