It is impossible to edit or delete existing URL aliases in Administer>Site building>URL aliases.
* If you select the edit link for an existing alias you get an empty form.
* If you select the delete link for an existing alias (and confirm afterwards), you get the message "The alias has been deleted", but it isn't deleted actually.
The problem is within path.module:
- The functions function path_admin_edit() and path_admin_delete_confirm() are still defined with pre-FAPI3 parameters
- The function path_form() is defined correctly, but invoked twice with wrong parameters.
Patch against HEAD attached.
Comments
Comment #1
riccardoR commentedFixed copy&paste typo.
Comment #2
riccardoR commentedA brief introduction before talking of the critical error mentioned in the issue title :
I have seen that one of the fixes I proposed here (deletion of existing aliases) was already committed as part of http://drupal.org/node/154046. Other changes to path module were committed with http://drupal.org/node/147723 -- Deletion API for core
While trying to reroll my patch I verified that it is still impossible to edit existing alias. Moreover I realized that URL alias filtering doesn't work, and I read on the Development ML that path module is still to be converted to use the deletion API.
Therefore I rerolled my patch with the following improvements/fixes concerning the URL aliases Admin interface:
- Fixed alias editing
- Fixed alias filtering and added "Reset" filter key (I think it is useful).
- Use of deletion API to delete URL aliases.
I think this might be a starting point for deletion API conversion. I did much testing and it works correctly.
Now the above mentioned critical error:
It is a follow-on of http://drupal.org/node/147723 -- Deletion API for core:
when I try to edit existing aliases from the Admin interface I always get 503 - "Connect failed" error.
The problem is caused by the following changes made to
path_set_alias()This approach work well when
path_set_alias()is invoked via nodeapi hook with a deletion package already opened -- i.e. : if you delete a node with an alias, the alias is also deleted.But when you edit an existing alias from the Admin area, the function
path_set_alias()is used recursively and those deferred alias deletions cause an infinite loop, ending up in "503 - Connect failed" error.To be precise, no deletion package is available in this case (because it is an edit operation actually).
For now I have rolled back the above changes. The side effect is that an aborted node deletion ends up in deleting the alias anyway. I think the logic here must be changed to accommodate both deletion API integration and URL alias editing.
Thanks for any comment or hint.
Comment #3
riccardoR commentedThis issue has been fixed here: http://drupal.org/node/154517 -- path module breakage, deletion API conversion
Marking as duplicate.