pathauto_admin_delete_submit() uses return instead of $form_state['redirect']
Freso - May 8, 2008 - 18:14
| Project: | Pathauto |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
See Submit handlers use $form_state rather than returning urls.
Caught by the awesome Coder module. :)
| Attachment | Size |
|---|---|
| pathauto_5x_to_6x.patch | 562 bytes |

#1
Greggles caught a little tricky thing -
$nodeisn't defined in the function! So I went to look at how core handled_submitfunctions, and they didn't set thenidkey. (See #256289: Superfluous example code in 5.x to 6.x FormAPI guide.)Re-rolled with just
redirectset.#2
I tried playing around with bulk deletion of aliases, and the behaviour seemed to be the same with and without the patch... the patch makes Coder not bark on this bit of the code though, and is better Drupal 6 code anyway.
#3
Freso's patch is against D5, this patch is against D6. Works as advertised.
Edit: Patch removed.
#4
I'm sorry to disappoint, but my patch was (and still is) against the 6.x branch. The easy way to tell? It's patching pathauto.admin.inc which doesn't exist in <6.x-1.x-dev (including 6.x-1.0, for the record). Your patch on the other hand is patching pathauto.module... so it's actually you who is either patching against 5.x or an old version of the 6.x code.
#5
I see. From the name of the patch it sounded like it was patching against D5. The lack of the file in 6.x-1.0 then lead me to believe that pathauto.admin.inc was an artifact of the 5.x branch of pathauto.
Either way the code modifications you made work, whether in 6.x-1.x-dev or 6.x-1.0
My apologies for the confusion.
#6
I think this could be RTBC'd. I applied the patch then mass deleted my categories and that worked.
#7
Yeah. I'm just waiting for Greg to poke his hand out for a thumbs up and I'll commit it.
And no worries. :) The reason I named the patch as I did was since it finishes the 5.x to 6.x port. This is the last remnant of 5.x code (that I could find) which needed converting to 6.x code.
#8
Definitely - the updated version looks great to me.
#9
Committed! :)
#10
Automatically closed -- issue fixed for two weeks with no activity.