I'm not sure if this is actually an issue or not, but when I use the Delete Aliases tool, all the Pathauto-created aliases aren't being deleted when I check off:

users
content
vocabularies and terms
user trackers

The ones that remain are things like:

blog/myname ---> blog/1
blog/myname/feed ---> blog/1/feed
blog/anothername ---> blog/2
blog/anothername/feed ---> blog/2/feed
forum/discussion ---> forum/1
forum/discussion/general ---> forum/2
gallery/somegallery ---> image/tid/88
gallery/somegallery2 ---> image/tid/89

Of course, I can delete them by using the delete "all aliases" option, but then my manually-created aliases get deleted too. Any ideas? Also, I recall having a "Delete all Pathauto aliases" option in an earlier version of Pathauto...was this removed or perhaps was this just a patch that I didn't reapply? Thanks.

CommentFileSizeAuthor
#3 blog_forum_deletes_228696.patch1.06 KBgreggles

Comments

greggles’s picture

Title: "Choose Aliases to Delete" not deleting all Pathauto aliases » "Choose Aliases to Delete" not deleting all Pathauto aliases for images and images
Category: support » feature

The "delete all pathauto aliases" feature was removed. It didn't work well.

There should be the ability to delete blog paths - I'm not so sure about forums.

I'm changing this issue to a feature for bulk deleting of images and forums.

tj2653’s picture

Are you saying there should already be a checkbox to delete blog paths? For whatever reason, I don't have an option to delete blog paths, and they aren't deleting using any of the other options (besides "all aliases"). This is using the newest 5.x-2.x-dev, and I also tried 5.x-2.1 too. Thanks.

greggles’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

The blog problem was a typo in the code - the module "blog" not "blogs".

The forum problem was that I just didn't have support for forums. That's not added. The image support should ideally come from image module itself.

This patch/system has a flaw which is that it doesn't handle the feed aliases for forums since those are stored with a taxonomy/term/ prefix. I don't plan to solve that now but note it as a "known weakness".

Please test this out for blog and forum paths and confirm if it works for you.

tj2653’s picture

Thanks greggles, although I just tested for what I needed it to do, it seems to work well. I added this for the images in my case:

  if (module_exists('image')) {
    $objects['image/tid/'] = t('images');
  }

Can you foresee any problems with that? I guess the reason it should be in the image module is because it's not a core module and if we put it in, then everyone would want support for their non-core module(s)?

greggles’s picture

@tj2653 - that should be added to the image module itself. Note that pathauto_path_alias_types is an implementation of hook_path_alias_types so that any module can implement it. Pathauto handles all the hooks for core - other modules should do it for themselves.

tj2653’s picture

Yup...got it. Thanks :)

greggles’s picture

Status: Needs review » Fixed

Committed to 5.x and HEAD.

Thanks for reporting and testing, tj2653!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.