Closed (fixed)
Project:
Pathauto
Version:
5.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Feb 2007 at 16:00 UTC
Updated:
11 May 2007 at 12:22 UTC
Jump to comment: Most recent file
Comments
Comment #1
AstralP commentedYou can just delete all fields from the url_alias table in your database using phpadmin (or whatever yu use to view the db). Not a pathauto solution but thought I would mention it as it is easy to do.
Also bear in mind that path is the module that deals with aliases so such a function would also wipe out all aliases which had been built by other means. If you just want to stop using aliases you could disable path and pathauto.
A very simple function which would delete all aliases would be something like this (untested):
You could also use TRUNCATE instead of delete which would reset the autonumbering. I would find such an addition useful especially considering the problems with v5 and losing categories at the moment.
Comment #2
AstralP commentedI have created a patch which adds this feature to the general section. It was against v5 but will probably work for 4.7 unless there was some change in the way variables were stored.
If anyone has an opinion on whether to use TRUNCATE instead of DELETE I'd like to hear it, I don't know if losing the autonumbering would have any adverse effects.
Comment #3
gregglesHi - first, features go against 5.x so I changed the version.
Second, this seems like something that should be implemented in the core path module and not as part of pathauto. It's not really related to pathauto specifically and other systems (like urlify) could benefit from having this in core.
Thanks AstralP for providing the code for this feature. If you agree with my ideas, perhaps you'd consider modifying it to work with the core path.module
For a code review:
Your query needs to use {} in order to work on sites that use prefixes.
If we do implement this, think a confirm would be appropriate since this is a serious thing it shouldn't just happen without a confirmation.
The function pathauto_remove_all_aliases should get a comment above it
The t() on the description should use "" instead of using ' and then escaping the ' in don\'t (I've heard this can make extractor.php happier)
Comment #4
gregglesI'm marking this won't fix.
If someone wants to revive it and move it into core then great, but it's a "won't fix" in pathauto.
Comment #5
gregglesI changed my mind and implemented this as a menu local task in the url alias screen.
I realized that for automated testing of pathauto this is an important feature. Thanks AstralP for providing the basic code to get this done.
Comment #6
killes@www.drop.org commented