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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel’s picture

Status: Active » Needs review
FileSize
1.19 KB

It'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' ?

Gábor Hojtsy’s picture

Status: Needs review » Needs work

Why do you need an $id, when you have a $pid? You also replaced some $pid usage with $id.

swentel’s picture

$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 ?

Gábor Hojtsy’s picture

Well, 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()? :)

swentel’s picture

FileSize
906 bytes

Ok, 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 :)

Gábor Hojtsy’s picture

Status: Needs work » Fixed

Thanks, committed!

swentel’s picture

One 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).

Crell’s picture

@swentel: Oopsies. That's my fault. Fix is here: http://drupal.org/node/163039

Anonymous’s picture

Status: Fixed » Closed (fixed)