There is a problem with the way path module uses drupal_get_form to to build the add/edit form for path aliases.

Problem 1 - right now for adding a new alias the warning is generated: missing argument 1

Problem 2 - the function now designated as the form builder is doing things like setting the page title which should never be done in a form builder - for example, I may want to use drupal_execute on this form from another page.

It looks as though the problem was caused by a somewhat blind conversion to using drupal_get_form as the page callback, which is not appropriate in this case.

Attached path fixes these issues.

CommentFileSizeAuthor
fix_path_form_1.patch2.27 KBpwolanin

Comments

pwolanin’s picture

Title: path module - problems with » path module - problems with form builder for path_admin_form
eaton’s picture

Status: Needs review » Reviewed & tested by the community

"Somewhat blind conversion" is exactly what was used. Thanks for the great catch, pwolanin!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

I was in part guilty for this particular misuse of drupal_get_form(), committing a patch which was fixing this problem by pushing it into the wrong direction, not to eliminate drupal_get_form, but to make the code comformant to it.

So fully appreciating the fix, thanks! Committed!

Anonymous’s picture

Status: Fixed » Closed (fixed)