Browser - Firefox 1.5
OS - Linux Fedora Core 6
Installed drupal 6.x (drupal-6.x-dev.tar.gz - size 902056)
1 - enabled path module (http://www.testsite9.com/admin/build/modules)
2 - added the first node of type page - node/1
3 - created a url alias
alias: contactus
system: node/1
4 - in the list alias page (http://www.testsite9.com/admin/build/path) it shows the
listing as
Alias System Operations
aboutus node/1 edit delete
however on clicking the edit link (http://www.testsite9.com/admin/build/path/edit/1?destination=admin%2Fbui...)
it displays the create new alias page (minus the top header line).
see attached screenshot, it shows the edit url in the browser link bar.
Comment | File | Size | Author |
---|---|---|---|
#5 | path_admin_inc_0.patch | 906 bytes | swentel |
#1 | path_admin_inc.patch | 1.19 KB | swentel |
Screenshot_29.png | 108.57 KB | yasheshb |
Comments
Comment #1
swentel CreditAttribution: swentel commentedIt's also not possible to delete an alias. Somehow, the pid of the alias isn't passed to the edit or delete functions. Attached is a patch which fixes this problem, but can a core developer look at it, because I'm not sure if it's 'safe' ?
Comment #2
Gábor HojtsyWhy do you need an $id, when you have a $pid? You also replaced some $pid usage with $id.
Comment #3
swentel CreditAttribution: swentel commented$pid seems to be an array and when you do a print_r of $pid I get this:
Array ( [storage] => [submitted] => [post] => Array ( ) )
print $id (as a second argument) in path_admin_edit returns the id of the alias.
So does the id of the url alias need to be in $pid array ?
Comment #4
Gábor HojtsyWell, forms retrieved from drupal_get_form() have a $form_state array passed first, this is what you see in the var_dump(). These two functions simply need a $form_state parameter first, which should solve the problem. Otherwise form where would the $form_state come from in the call you modified for path_admin_form()? :)
Comment #5
swentel CreditAttribution: swentel commentedOk, I've browsed around in the code and noticed the enormous amount of this new variable called '$form_state' in drupal 6. To be honest, I've tested drupal 6 before, but never really looked at the (api) changes in code etc. That's what I'm doing now. Attached is a new patch which is cleaner now I think. Correct me if I'm wrong of course :)
Comment #6
Gábor HojtsyThanks, committed!
Comment #7
swentel CreditAttribution: swentel commentedOne last thing, there is a typo at the top of the file in page.admin.inc:
/**
* @file
* Administrative page callbacks for the contact module.
*/
'contact module' should be 'path module' I guess (or something else).
Comment #8
Crell CreditAttribution: Crell commented@swentel: Oopsies. That's my fault. Fix is here: http://drupal.org/node/163039
Comment #9
(not verified) CreditAttribution: commented