WordPress “Decategorizer” plugin

*IMPORTANT, PLEASE READ*

Dear users,

there has been another plugin out there for a while now that does the same thing Decategorizer does. And now that the plugin’s author has added 301 redirection for old category links, I see no reason for anyone to use my plugin anymore.

WP No Category Base by iDope adds almost no overhead and does not require another plugin to function.

It just works – the proper way :)

So please download it, install it, activate it and remove Decategorizer from your WordPress installation.

Thank you for using my first WordPress plugin, I hope you’ve found it useful ;)

I’ll leave the comments open, just in case.

Aesqe

178 comments

  1. Pingback: WordPress › Decategorizer « WordPress Plugins

  2. Pingback: Leonaut.com

  3. joseph

    i have to try this out. if it works as promised, i can get down to doing some things i’ve been postponing until future versions of wp.

    thanks, much.

    Reply
  4. aesqe Post author

    I hope it works for you :)

    Also, be sure to set the redirection method to simple / pass-through, that’s something I forgot to put in the first version of the readme file.

    Feel free to post any questions here, I’ll try to help as much as I can.

    Reply
  5. aesqe Post author

    I got my hopes up prematurely.

    It seems that the regexps that I’ve provided work only if you have a 4 digit number between 1970 and 2020 in the beginning of your category name.

    My apologies :/

    So, I’ve spent the last couple of hours trying to come up with something else that would actually work like it’s supposed to, and I ended up with the following:

    /(?![0-9][0-9][0-9][0-9][/])(.*)/page/(\d*)/

    this code would replace all the previous regexp redirections that I’ve proposed.

    where it fails is monthly and daily archives:

    2008/page/2/ works just fine

    2008/07/page/2/ and 2008/07/03/page/2/ do not.

    I need a regex guru, it seems…

    Reply
  6. aesqe Post author

    I was rewriting the readme yesterday when I came upon a few issues I’d like to fix within the plugin itself, like adding the trailing slash to URLs without needing to modify the main index file. I’m almost done with it.

    There’s also the problem with sitemap plugins – they will include “/category/” in URLs. Because this solution is a hack, I doubt that plugin authors would add a checkbox option to remove “/category/” from sitemap URLs, but who knows…
    I’m hoping that WordPress team will fix this issue even before v3 comes out.

    Here’s the current state of the readme.txt:
    http://wordpress.skyphe.org/wp-content/plugins/decategorizer/readme.txt

    I’ll finish the testing as soon as I can, but I’ve just started a new job and I’m really short on free time right now :/

    Let me know if this works for you.

    Reply
  7. aesqe Post author

    Final regexp (hopefully), with tag, author, search and comments excluded. Sorry I didn’t think of it sooner:

    (?!^/[\d]{4}/|^/tag/|^/author/|^/search/|^/comments/)^/(.+)/page/([\d]+)/

    Reply
  8. Pingback: I’m a dreamer, a distant dreamer :) » Skyphe.org

  9. noname

    So to make it work i MUST use the girafes redirection plugin? If so, would be there a possibility for some quick redirect trick, when i do not want to use it? (i guess it would be just one simple rule which would just cut the category_base)
    P.S.: how about RSS links etc. – everything works?
    P.S.: and what happens, when i got a page or single (using /%postname%] with the same name of the category?

    Reply
  10. aesqe Post author

    to noname:

    Yes, you must :) But it shouldn’t affect your site’s speed, if that’s your concern.

    RSS links and sitemap links work just fine, no problems there.

    When using just /%postname% as permalink structure (no trailing slash), you will see a category archive.

    When using /%postname%/ (with trailing slash):
    If a page with that name exists, you will see the page with that name.
    If it doesn’t, you will see the post with that name.

    If that doesn’t work for you, please leave another comment so I can see if there’s anything that could be done about it :)

    I have updated the plugin today. V0.3 brings automatic creation of redirection rules for categories that have child categories.

    As always, read the readme.txt and try it locally first ;)

    Reply
  11. PH

    Hi, and thanks for this great plugin ! I have an issue though : the sub-categories get 404 error pages :-/
    I have this structure : mydomain.com/videos => works OK
    mydomain.com/videos/new => Doesn’t work. What works is : mydomain.com/new where new is still the “videos” category daugther.
    So I have to make a 301 redirection from the redirection plugin for all the subcategories, it’s kind of a bummer… :-/ I went through your site and it works with no problem, so do you have any idea where it might come from ? (plugin conflicts, cache…)
    Many thanks !
    Paul

    Reply
  12. aesqe Post author

    Hi, PH.

    Unfortunately, I can’t tell you what the problem might be without more info…

    The plugin is designed so that it checks if any subcategories with published posts exist and, if so, it automatically adds a redirection for them, storing them in the “Decategorizer” group in Redirection admin area, that’s it :)

    What version of Redirection are you using? If it’s v1.x, you have to change the pluses (+) in regexp with asterisks (*).

    You can e-mail me at (aesqe at this domain) if you wish, I’d be more than glad to help you :)

    Reply
  13. PH

    Hey Aesqe, thanks for your quick reply !
    Apparently, it is a known problem of Wordrpress as I read there : http://www.brianshoff.com/wordpress/category-base-removal-plugin.htm#comment-1544. But as your site doesn’t have this kind of problem, I thought you worked your way around it :)
    So basicaly, you activated your plugin after the “redirection” plugin and it worked perfeclty from scratch ? Did you do any redirection before ?

    (Sorry if I don’t send an email, I’m just thinking these comments might help another reader)
    Cheers
    Paul

    Reply
  14. aesqe Post author

    Oh, I see what the problem was :)

    You don’t need the category base removal plugin for this to work, and yes – first you activate the Redirection plugin, and then Decategorizer.

    I’m not 100% certain, but I think you have to visit Redirection’s settings page so its mysql tables can be created, so do that as well, before activating Decategorizer.

    I’d also recommend deleting all the subcategory redirections you have added by hand, before activating Decategorizer, because I still haven’t perfected the plugin and, for now, it doesn’t check if the redirection is correct if it’s already been added manually.

    And, of course, please do backup your database before you do anything of the above :)

    I’m a bit tired, so I hope all of this makes sense 8[]

    Reply
  15. Pingback: Speeding Up Your Wordpress Blog | Spontaneous Derivation

  16. aesqe Post author

    I’m almost done with v0.5, which is fully automated and executes only on activation and on post/category create/edit/delete actions, not on every page load.
    It also won’t activate itself if “Redirection” plugin isn’t installed, and will deactivate itself when “Redirection” is deactivated.

    It’s done, basically, I’m just having difficulties finding out why sometimes the code is executed upon a certain action, and sometimes not. Might have something to do with me testing it on 2.7 which still isn’t finished.

    Expect it released by the end of the week.

    Reply
  17. PH

    Hi aesqe, thank you for your response :) but unfortunately, the trick did’nt work for me. I deleted redirection & decategorizer, emptied my sql base and started over again, with no luck :( for instance, When I see the options of redirection for the group decategorizer, the only redirections that I have are for the main categories and not for the sub-categories… This is all very weird ! Because for instance, your website has sub-categories, right ? Did your plugin create the redirection right away without any problem ? What kind of settings did you already have in the redirection plugin ? Everything is default on my site, and the permalinks structure in WP is set to “/%category%/%postname%”, which kind of make sense to me…
    Nonetheless, I can’t wait to test your new version of your plugin !

    Reply
  18. PH

    Ok I found the solution to my problem : adding manually the redirection of the subcategories. Here’s the how-to for those who wonder :
    Imagine you’ve got the first category that is titled “main” and the sub-category that is titled “sub”.

    So you you want “yourdomain.com/main” & “yourdomain.com/main/sub”
    You go to the redirection settings in the decatogerizer group.
    in the source URL field, you put : “/main/sub” (without the quotes)
    Match: URL only, Action : Pass-though,
    Target URL : “/category/main/sub” (without the quotes)

    Do that for all your sub-categories, and voilà ! You’re done :)

    Reply
  19. aesqe Post author

    Hi, PH :)

    The problem was you had no trailing slash at the end of your permalink structure and I didn’t account for that :/

    Will fix for v0.5, thanks for your input :)

    Reply
  20. aesqe Post author

    Wow. That trailing slash took me a while to handle :)

    I’m pretty sure I’ll be done with everything by tomorrow evening.

    PH: I’ll link the new version here first, so you can try it out, if you don’t mind. I’ve tested it locally and it works just as expected, but I’d really appreciate if you could test it before I release it to public. Is that OK?

    Reply
  21. PH

    Sure ! I’d be glad to help you out with your great plugin, it’s the least I can do :) Could you please send me an email when it’s online so I don’t forget to download it ?
    PH

    Reply
  22. Utilaje

    Hi aesqe, I was looking for a while for a plugin that could redirect the old category URL to a new one without category_base text in permalinks.

    I’ve installed “Decategorizer” and everything looked fine until I tested the old permalink (with category_base text in permalinks)
    It seems that now I have two URLs with the same content… one with category_base text in permalinks and one without. The older one is already indexed by google and new one will be very soon…

    Now, I don’t know how good is that for SEO purposes but in my opinion it’s not to good.

    Now I’m thinking how can I use this plugin and be seo friendly too. Until now I only came up with the idea of redirecting the old permalinks (with category_base text in permalinks) with Urban Giraffe’s “Redirection” plugin to a 404 error.

    I don’t know if it’s working… did not tested yet

    Anyway what I wanted to ask was that if there is no way that one can do this by a 301 redirection – SEO friendly ?

    Reply
  23. aesqe Post author

    Hi, Utilaje, and thanks for your input – that’s one more thing I forgot to take care of, 301-ing the old category permalinks, eh :-)

    I hope to polish most of the “quirks” in v0.5 by the end of the day, and I’ll definitely add 301 redirects for old category permalinks to the plugin. I’ll also put the link to the plugin download here first, so you and PH can try it out and, if it’s not too much to ask, notify me of any problems or “weird behaviour”.

    For now, Utilaje, you can just add one more redirection with Urban Giraffe’s “Redirection” plugin like this (best if you put it in the Decategorizer group, if you’re already using Decategorizer):

    source url: /your_category_base/(.+)
    target url: /$1
    match: url only
    action: redirect to url
    regular expression: checked

    that should 301 redirect all /your_category_base/category_name/ urls to /category_name/

    Reply
  24. aesqe Post author

    OK, here it is for anyone who wants to try it: Decategorizer v0.5.

    So, in a nutshell:
    1) install Redirection and visit its settings page (so its tables are created)
    2) install Decategorizer
    3) that should be it for all eternity. I hope :)

    Please report any and all suspicious behavior as soon as you can!

    If I get no complaints (fingers crossed, heh) by this Wednesday (October 29th, 2008, noon CET), I’ll release this version to the general public.

    Thanks for your time :)

    Reply
  25. Utilaje

    Hi aesqe,
    Just tested the new version of the plugin. I t works for categories and tags with pagination but not for post page. I’m not very shore if it’s not working for the posts page in general but in my case I’m using a static page as home page. If you want you can take a look on how it’s working on my “test” blog…
    http://www.caututilaje.ro/utilaje/ – here it is the posts page (as I said before I’m using a static page as home page). When I click “Older Entries” I get a 404.

    Anyway great job doing the redirection of the old slugs without getting into a loop. Because this was the problem (at least) for me when I wanted to redirect the old slugs with Urban Giraffe’s “Redirection” plugin.

    I’ll try it on another blog without a static page as home page – I hope that it can not do any damage to a blog…
    And if it’s not working then I will only delete “Decategorizer” group from Urban Giraffe’s “Redirection” plugin and reinstall the old version of Decategorizer.

    I’ll keep you up on how the test worked.

    Reply
  26. Utilaje

    OK,
    Just tested on another blog without a static page for home.
    Everything it’s working fine. Pagination for home page, category and tags (these are the sections where I tested it)

    The only thing that I can say it’s that the old slugs (with category_base text in permalinks) for the second page, third page and so on… for categories and tags are still not redirected.

    And for my example when a blog uses a static page as home page what do I need to modify to make it work. Or is it possible to work on such blogs?

    Reply
  27. Utilaje

    Now another few details (sorry for writing more posts but I try to give all the info that you might need)

    For the blog with a static page as home page, I’m using “.html” at the end of the permalink structure (/%category%/%postname%.html) for posts, and here it’s redirecting the old slugs (with category_base text in permalinks) for the second page, third page and so on… for categories and tags…

    For the second blog without a static page as home page I’m using this permalink structure: /%category%/%postname%/ and it’s not redirecting the old slugs (with category_base text in permalinks) for the second page, third page and so on… for categories and tags

    Reply
  28. aesqe Post author

    Thank you so much for your input, Utilaje, I’ll check it out when I get home from work.

    I obviously forgot to take care of a) homepage pagination and b) 301 redirection for paginated category/tag archives with slugs including category_base.

    Reply
  29. Utilaje

    Just tested the latest version on both blogs!
    Everything it’s working great on both blogs including the 301 redirections for the old slugs.
    This looks awesome!
    Will be using this from now on.

    Thanks!

    Reply
  30. aesqe Post author

    (*sigh of relief*) I’m glad it works for you, Utilaje, thank you for testing it :)

    Let me know if you run into some problems or if something doesn’t work as expected.

    I’ll push this version to WordPress repository tomorrow, if no one reports any errors.

    Reply
  31. PH

    Hi aesqe !
    Hope you’re fine :)
    I just wanted to tell you that apparently there’s a problem with the new version of “Redirection”, because since I did an update (2.1.4), it screwed everything up :(
    I don’t know if you noticed it as well ?
    PH

    Reply
    1. aesqe Post author

      There’s an exit(); call in “redirection/actions/pass.php” on line 42 which was added in 2.1 version, I think, that is causing the premature end of output. But I can’t remember what was the last version of Redirection I had tested Decategorizer with, so I don’t know if the problem is that particular exit call or something else. Deleting or commenting out that line resolves the problem for me, but I haven’t tested it thoroughly, so you are pretty much on your own with this until an update comes out… :/

      Reply
  32. T4L

    Thanks, aesqe. I commented out the exit(); as you mentioned that it could be the “troublemaker” and the Decategorizer plugin was “working” again. No problems so far.

    Reply
  33. MuneyMan

    This plugin does not work with the new redirect plugin version, will you be updating it so it does? I am currently using a older version of redirect just to maintain ability to use decategorizer.

    Reply
  34. aesqe Post author

    Hi MuneyMan.

    There was a bug in Redirection plugin in some versions between 2.0.10 and 2.1.4 (not sure which ones exactly), but it was corrected in version 2.1.5 that came out a couple of days ago.

    So, if you upgrade to Redirection 2.1.5, everything should work as expected.

    If not, please leave another comment here or send me an e-mail.

    Thanks :)

    Reply
  35. Nicole

    Beautiful plugin! However, it seems to cause me to have an extra / at the end of a category list (both on the sidebar and in a place where I call wp_list_categories). Any ideas what I should do to get rid of it?

    Reply
  36. aesqe Post author

    Thanks PH, and thanks Nicole :)

    Could you please tell me what version of WordPress and Decategorizer are you using? Because I thought I squashed that bug long ago…

    I’m using WordPress 2.7 with the default theme on http://wordpress.skyphe.org, and it calls for

        wp_list_categories('show_count=1&title_li=<h2>Categories</h2>');
    

    in the sidebar, and it works just fine. Maybe also posting your parameters for the wp_list_categories() could give me a hint at the problem.

    Hope to fix it soon ;)

    Reply
  37. Nicole

    Hmm. I’m using WP 2.7, Decategorizer 0.5.2.1, Redirection 2.1.6. The theme is a one that I’ve created. The sidebar calls for

    wp_list_categories('title_li=&depth=2&exclude=1,12,47,49');

    I hope it’s something simple, like I’ve managed to download an older version of something. Thanks for the help!

    Reply
  38. Utilaje

    Hi aesqe I having some problem with the redirection of the “uncategorized” category.
    I renamed it on my blog to:
    slug – “altele”
    name – “Evenimente si noutati”

    When I click on the link ( http://www.medicas.ro/altele/ ) of the category I’m redirected to http://altele/

    I’m using WordPress 2.7 and the latest versions of Redirection (2.1.6) and Decategorizer (0.5.2.1)

    I don’t why is this happening. I searched my list of redirections an none of them contains “altele”

    Could you take a look?
    Thank you for your awesome work!

    Reply
  39. Utilaje

    Back with some info… Decategorizer it’s working OK !

    I don’t know exactly what happened but here is exactly what I’ve done:

    I renamed (change only the name) of the “uncategorized” category and after this the error described above started.

    I’ve tried lots of solutions but nothing worked until:
    1. I deleted the “Modified posts” group redirections from Redirection. (here was the problem)
    2. After this I deactivated Decategorizer plugin and (now I don’t think that is necessary)
    3. deleted Decategorizer group of redirections. (now I don’t think that is necessary)
    4. Reactivated Decategorizer plugin
    5. Everything worked OK again

    Now I think that “Modified posts” caught some modifications on the category and made a new rule of redirection. This new rule combined with Decategorizer plugin made that error being possible.

    Now everyting it’s OK.

    Thank you again for your awesome work!

    Reply
  40. aesqe Post author

    Utilaje: that link seems to be working now.
    It probably didn’t work before because the Redirection rules created by Decategorizer weren’t refreshed after you changed your category name, but were refreshed by some other action I put a hook on (like adding or deleting a post). I’ll look into it.

    Nicole: I honestly don’t know what the problem could be… :/
    I’ll run a few test cases by tomorrow and, hopefully, find out what’s wrong.

    Reply
  41. aesqe Post author

    Nicole: Decategorizer v0.5.3.1 is out and it should fix your problem.

    I’d appreciate if you could leave a comment here so I’d know if it’s working or not, thanks :)

    Reply
  42. aesqe Post author

    No problem, Nicole, it was actually easy to fix, just needed to trim the whitespace in one place :)

    I’ve released another version today – nothing too critical, but now, Decategorizer (v0.5.3.2) should work flawlessly with WordPress installed in a subfolder too.

    Reply
  43. T4L

    Thanks so much for an awesome plugin, aesqe. I’m having trouble writing an effective regular expression to allow this http://domain.com/category/sub-category/?param=1, even though http://domain.com/category/sub-category/page/?param=1 is permitted. Why? Because I’ve written a Flash E-Card plugin and on a “base” WP installation it works great. I’m hoping this is a, “duh – that’s easy” for you because, it looks like it, but I’m simply clueless and getting “compiler” errors as the fruits of my “experimenting” with writing / reordering regular expressions has got me nowhere.

    Reply
    1. aesqe Post author

      Hi T4L, and thanks for the input :)

      I will look into it later today and post a comment here when I find a solution.
      It could be a “duh – that’s easy” situation, yeah, but you never know, so cross your fingers :)

      Reply
  44. T4L

    Awesome! It worked like a charm. I just tested it out (was able to echo a $_GET ) on my dev / local site and another “live” site. Sorry I troubled you with this, but I was unable to find any resources online that gave more than just an overview of how to write regular expressions for htacccess files. BTW – if anyone needs to “force” a trailing slash at the end of their page / post / category page URL requests to their domain(s), I have one (that was an easy find online). I’m not sure how I would make it into an entry for this plugin or the Redirection plugin, but it is easy enough to paste into your htaccess file. Aesqe, thanks again for your help.

    Reply
  45. aesqe Post author

    Thanks for letting me know, T4L, I’m glad it works for you :)

    And, just to clear things up, heh:
    Decategorizer puts the trailing slash on category links only if there is a trailing slash in your permalink structure.
    So, if your permalink structure is /%category%/%postname%/, the trailing slash will be there for category links too. If it’s something like /%category%/%postname%, or just /%postname%, that means no trailing slash for you :)

    I’ve done it like that because that’s how WordPress treats date archive links, so, I figured, why change the approach? :)

    If there are no complaints on v0.5.4 by tomorrow afternoon, I’ll push it to the plugins repository.

    Reply
  46. T4L

    Oops. I spoke too soon. Well, the fix I requested does work (many thanks) but I discovered the following: With the 0.5.4 version, the checkbox category list in wp-admin/post.php shows each category with a trailing slash. I reverted back to 0.5.3.2 and the trailing slashes after the category display disappeared. Then I thought perhaps my “trailing slash” htaccess script was causing the issue, but I removed that too and it had no effect on the check box listing display. The checkbox category list display with the trailing slash didn’t seem to have any effect on navigating through the site. I also validated the trailing slash appearance on my dev wp installation that does not have the added htaccess script that I have for another one of my sites.

    PS – I needed the “forced” trailing slash b/c I am migrating a site and there are tons of links “in the wild” as well as user error in cutting / pasting links that leave out the trailing slash; so with all due respects and praises Decategorizer rocks. I just needed this hack for my situation.

    Reply
  47. Sjy

    Hey…

    Really Nice Plugin… Will it affect SEO in negative way… by any chance??

    Also while going thru your test site… I saw the Paged Page demo… which plugin is it?? Lemme know… I need it too…

    Regards.

    Reply
  48. aesqe Post author

    T4L: consider that fixed, will post another updated version a bit later.

    MuneyMan: Sorry to hear that, I’ll try to help you as fast as I can – could you tell me what version of Redirection and Decategorizer, and what permalink structure are you using, also if your site or WordPress installation resides in a subfolder?

    And please try deactivating and reactivating Decategorizer first to see if that solves the problem.

    Also, if your Redirection plugin is set up to monitor and redirect modified posts, check that list to see if something looks conflicting.

    Reply
  49. MuneyMan

    Thanks for the fast response but the problem was with redirection NOT decategorize. My mistake on thinking it was this plugin, anyway I got the problem fixed, had to reinstall redirection to the SQL database.

    Everything is working perfectly again! :)

    Reply
  50. aesqe Post author

    Sjy: it will not affect SEO in a negative way, don’t worry.

    And a paged page is a standard feature of WordPress, you just need to place where you want the next page to appear.
    Here’s the WordPress.com page about it: http://support.wordpress.com/splitting-content/nextpage/.

    You can also install the TinyMCE Advanced plugin and place the nextpage button on the TinyMCE toolbar, to make your life easier if you find it useful :)

    Reply
  51. aesqe Post author

    Ray: I’ve encountered the feed bug on some sites, while some work just fine, and I’m trying to solve it as quickly as I can. It could be the permalink structure, so could you please send me yours?

    About that other thing, I can look into it, but I don’t think I’d incorporate something like that in Decategorizer. Maybe in some other plugin :)

    Reply
  52. aesqe Post author

    Ray: new version (0.5.4.3) is out, it should fix your feed :)

    Please deactivate and reactivate plugin after upgrade so you’re sure the redirections are recreated.

    Reply
  53. Pingback: WordPress Plugin Releases for 02/20 | Weblog Tools Collection

  54. PJS

    Hey,

    I don’t know why but from some reason it brings me into infinite redirect loops, I digged a little bit into the regular expressions, and i found the following interesting thing:
    Here is the RegExp: ^/cat([/]?|/feed[/]?)((\?.+)?)$
    Which means it can be:
    /cat?blablabla
    /cat/feed?blablabla
    /cat/?blablabla
    /cat/feed/?blablabla

    But it can also be:
    /cat
    only, because of ((\?.+)?)$. Now, it redirects it to: /category/cat,
    but you have another regexp which redirects /category/cat to /cat, and that makes the loop.

    When I changed ((\?.+)?)$ to ((\?.+))$, it worked fine, however it won’t take feeds without query strings.

    So my advice is to seperate this RegExp into 2 different RegExps.
    1. Will deal feeds
    2. Will deal query strings

    My last advice is to add title for thee redirections (the redirection plugin supports it). For example “Category name – Feeds”, “Category Name – Query Strings”. If you decide to include it, please use urldecode() on the slug, as wordpress encodes it.

    What do you think?

    Anyway, good job!

    Reply
  55. aesqe Post author

    PJS, thanks for the info!

    Could you please tell me what version of Decategorizer and Redirection are you using, and what permalink structure, because I wasn’t able to replicate the loop? And also when does the loop happen, on which url request?

    I’ve been thinking about adding titles for redirections, maybe as an option in the next version :)

    Reply
  56. PJS

    Hey @aesqe,

    I’m using decategorizer version 0.5.4.3, and redirection version 2.1.12.

    My cat structure is simple: domain.com/catname
    The loop happens when I access the category: domain.com/catname

    There is only 2 reasons why it can happen to me and not to you:
    1. Server configuration
    2. I am not using english as my URLs, so my URLs are being displayed as hexcodes, eg:
    http://pjs.co.il/%D7%A9%D7%99%D7%95%D7%95%D7%A7-%D7%91%D7%90%D7%99%D7%A0%D7%98%D7%A8%D7%A0%D7%98/

    Any ideas?

    Reply
  57. PJS

    Here is my Regexp:
    ^/%D7%A9%D7%99%D7%95%D7%95%D7%A7-%D7%91%D7%90%D7%99%D7%A0%D7%98%D7%A8%D7%A0%D7%98([/]?|/feed[/]?)((\?.+)?)$

    Btw, maybe I should just escape the ‘%’ ?

    Reply
  58. aesqe Post author

    PJS: could you please test if the loop still occurs when you disable the 301 redirection in decategorizer group (the one that is colored green and has ^/category/(.+) as source URL)?

    I’m afraid escaping the %’s won’t help, they’re not metacharacters in regexp…

    I presume your permalink structure is %category%/%postname%?

    I’ve created a category named שיווק-באינטרנט on my local installation with permalink structure as above, and WordPress has successfully converted its name into a urlencoded string (for the slug), and everything still works fine on my end.

    You could try creating a test category that doesn’t have any Hebrew characters in its name, and then publish one test post in that category. Then go to that category’s URL and see if the loop occurs.

    I’m sorry I can’t do more at this point, PJS, please let me know of the results…

    Reply
  59. Pingback: Naghies » Blog Archive » ?????? ??? ???????

  60. zlatev

    this’s the real deal! tried 2 other plugins before but nothing could manage my subcategories properly. only one thing that’s not a big deal at all – getting into empty cat. calls 404 instead of actually getting there followed by ‘there’re no post here yet’ message but i guess it’s a matter of configuration. i’m just not into it yet.

    Reply
  61. Wolf Larsen

    Hi,

    I’m on WP 2.7.1, K2, Redirection 2.1.13 and 0.5.4.3. I can’t get it working with an alternative page navigation, called SEO Pagebar 2. When I click in the sidebar, categories, its just fine, no category in the URL. But when I click to page 2, I get a 404 error. Is there any help?

    Wolf

    Reply
  62. Wolf Larsen

    Hi once more,

    its not the template or the SEO Pagebar 2. When I switch to WP default theme, the error is still there.

    Wolf

    Reply
  63. william

    Hey :)
    I can’t make it work :/
    I’m still getting 404 on sub categories…

    I tried to test it on a local (easyphp) fresh install of wordpress 2.7.1.

    Using :
    – Decategorizer 0.5.4.3
    – Redirection 2.1.13 (then tried 2.1.9 and 2.1.5, didn’t work either)
    – Permalink structure : “/%category%/%postname%/”

    “Seems” to work if i alter the permalink structure (like “/%category%/%post_id%/”).

    Also, i don’t see any redirection rule added in the redirection plugin admin panel ? Any clue?

    I just followed the readme.txt, that is activating Redirection (and visiting its admin panel), and then activating Decategorizer, and voilà (not!). Missed a step ?

    Reply
  64. aesqe Post author

    @Wolf:
    on my testing site (http://wordpress.skyphe.org), I’ve got the same configuration as you: WP 2.7.1, Redirection 2.1.13 and Decategorizer 0.5.4.3. I also have that same configuration on my computer locally – and everything works fine.

    Are you sure that you don’t have any conflicting plugins installed? Like top level categories, or something similar?

    What is your permalink structure?

    @william:

    Nope, didn’t miss a step, that should be it :)

    If you go to Redirection’s settings page and click on “groups” (/wp-admin/tools.php?page=redirection.php&sub=groups), do you see the Decategorizer group there?

    Reply
  65. william

    No i don’t see it :/ that’s why i tried using different versions of Redirection.
    First i tought maybe it was because i was using a localized (French) version of wordpress 2.7.1, so then i tried a genuine 2.7.1; did not help either :/

    Reply
  66. aesqe Post author

    @william:

    Please do the following, if it’s not a problem for you: in decategorizer directory, open the plugin file (wp-decategorizer.php), and uncomment (remove the two forward slashes from the beginning of line) line 271 (//echo ‘<div class=”updated fade”><p>’ . $cr_message . ‘</p></div>';). Save and close the file.

    Now go to settings->permalinks, change the permalink structure to something else (just /%postname%, for example) and save changes. When the page refreshes, you will see some text output on top of the page, like this:

    Blog folder :
    Regexp updated
    Previous items deleted
    Main regexp added
    301s added
    Walker URLs modified
    Redirection ^/uncategorized([/]?|/feed[/]?)((\\?.+)?)$ added

    please copy that text and paste it here in a comment, if it’s any different from the text I’ve pasted above. If it isn’t, I’ll try to think of something else :/

    Reply
  67. william

    Made a fresh 2.7.1
    permalink: /%postname%
    Latest Redirection / Decategorizer

    Blog folder :
    Regexp updated
    Previous items deleted
    Main regexp added
    301s added
    Walker URLs modified
    Redirection ^/uncategorized([/]?|/feed[/]?)((\\?.+)?)$ added
    Redirection ^/uncategorized/sub([/]?|/feed[/]?)((\\?.+)?)$ added

    And still getting 404 on /uncategorized/sub :(

    Reply
  68. william

    Btw with this permalink structure i even get a 404 on /uncategorized/ (which is logic, if no redirection is actually happening)

    /category/* works fine

    Template tags, however, rightly discards the ‘category’ slug.

    Still don’t see the decategorizer group in Redirection groups admin page.

    Oh and thanks for the support :)

    Reply
  69. Dominic Desbiens

    Hi,

    I use the permalink structure /articles/%postname%.html
    I use too a plugin (Smart trailing slash) that add the slash to the end of urls, but remove it from urls that have an extention.

    All work great. But Decategorizer don’t add the / at the end of categories. Could you tell me how to add it?

    Thanks

    Reply
  70. Dominic Desbiens

    Oups, sorry. I fixed it by removing a / in a function :

    $output = str_replace( “/” . $category_base, “”, rtrim($output, “/”) );

    to

    $output = str_replace( “/” . $category_base, “”, rtrim($output, “”) );

    Thanks

    Reply
  71. aesqe Post author

    Thanks for the tip, Dominic, I’ll have to make the plugin check if there’s an extension to post name to fix the problem you described.

    I’m almost done with my bachelor’s paper, so next week I’ll probably work on the plugin’s quirks some more.

    Thanks for understanding :)

    Reply
  72. Dominic Desbiens

    Thanks…

    Have another mistake…

    All works great, but in archives, the paged pages return 404 error :

    articles/2009/05 –> is ok
    articles/2009/05/paged/2/ –> 404 error

    Reply
  73. aesqe Post author

    @Dominic:

    I’ve figured out the error, but I can’t promise I’ll have it fixed before Monday, sorry, I’m still finishing up on my bachelors.

    It’s not a complicated error, it’s just a matter of ordering elements of the permalink in the right order.

    So, hopefully, 0.6 will be out by Monday morning with a few fixes.

    Reply
  74. aesqe Post author

    @william:

    I still have no idea why it doesn’t work for you, but I’ll install a few more error checks into the plugin and then we’ll see… sorry :/

    Reply
  75. Dominic Desbiens

    Have a good Week and ill wait monday for the fix. I just rebuild an entire flash games section and these pages will be in Google shortly. But all categories works. Just the archives. So i can wait.

    Thanks again for this great plugin !

    Reply
  76. Dominic Desbiens

    Hi,

    Maybe i have another problem. I rebuilt all my flash games section on my web site. For some reasons, i created two top level categories, one for my blog and other for my games. So, i post all my posts on subcats.

    Now, i try to have a custom page for my games top category. Cause it empty, the games category main page return 404 error. So, i try by adding a post in that category and use category-10.php template to change the look of the page.

    Even if i add post in my parent category for games, it return error 404 (bug in your plugin??)

    How could i replace the 404 error by a custom page who show all my subcats on it??

    Thanks

    Reply
  77. Dominic Desbiens

    Cool, nice job man. All paged archives works now !

    Have you an idea for my other problem? I would like to use a custom page (with template?) to replace the 404 error on my empty top level category. I would like to show the subcat list on the parent category page (without any post cause all posts are in subcats).

    Thanks for your reaction to fix the paged bug

    Reply
  78. aesqe Post author

    @Dominic:

    I’m glad the paging works now :)

    As for the parent category page error, I really don’t know what the problem could be, I’ve tested the situation both on my home computer and on my WordPress test site (http://wordpress.skyphe.org/1997-consequat/) and in both cases it does not return a 404 page.
    The test site link above leads to a top category page. That category has no posts of its own, just of its children – and it works.

    Do you have any plugins that could maybe cause this problem? Have you tried disabling Decategorizer for a minute to check if the category page works then?

    Reply
  79. Dominic Desbiens

    Hi,

    So, i disabled all my plugins. I seen that the redirection plugin caused some bugs. I just did a big clean on all groups and logs. Something caused the 404 error. Now it show the parent category with archive posts. I replaced that with my category-10.php template and i can show the subcat of my games section.

    Thanks for your help and fixing the bugs so quickly.

    Reply
  80. Dominic Desbiens

    Ooops, sorry. I seen another paged bug on your plugin. This time, it’s in tag paged archives. When you click on tag, it show you posts for this tag. If you click on page 2, 3 … it return 404 error… the same that was on paged archives …

    Reply
  81. aesqe Post author

    Ok, so I might have pushed the 0.6 out a wee bit too soon. I hope it didn’t cause too much trouble too anyone, because there were some misconfigured, um, things, in the plugin code :| My apologies.

    0.6.2 is what 0.6 was supposed to be.

    I’ve tested it with all the popular permalinks structures and it works. Also, this time for real, when you update your permalinks, or tag base, or category base – redirections _will_ be rebuilt. No more deactivating and reactivating the plugin.

    It’s available, as always, in the WordPress plugin repository: http://wordpress.org/extend/plugins/decategorizer/

    Reply
  82. Dominic Desbiens

    Ho man, very great fix again. The paged tags now works perfectly !

    Just a thing, the plugin don’t told me that was a new update in wordpress admin. Is it normal?

    Thanks again and sorry for my bad english. Im learning more right now to visit New York on last of june (im from Quebec, Canada).

    Reply
  83. aesqe Post author

    Yes, that’s normal, I think WordPress checks for plugin updates every 12 hours or so.

    I’m glad everything finally works for you now, Dominic :)

    Reply
  84. aesqe Post author

    Version 0.6.3 is out, fixes a small 301 redirection bug.

    Also, all informational messages are now saved to a log file instead of being echoed in the admin area.
    The log file won’t grow over 100Kb, don’t worry :)

    Reply
  85. Dominic Desbiens

    Hey, hello…

    I did an update trought the WordPress admin (auto update). I seen this morning a 404 error for all my subcats. I did a permalink update, nothing worked.

    Finally, i disabled the plugin, reactivated it and update permalinks again. All works fine now.

    Is there a problem when we update from admin? You should indicate it somewhere…

    Thanks

    Reply
  86. aesqe Post author

    Sorry about that Dominic, and thanks for reporting it.

    I tested for this kind of situation and it always worked in my case, but it seems I’ll have to re-test it and figure out what went wrong.

    I’ll have much more free time to fix this kind of bugs once I get my bachelor’s degree tomorrow :)

    Reply
  87. aesqe Post author

    Dominic, I’ve tested upgrading from 0.6.2.3. to 0.6.3 via automatic upgrade on my local installation of WordPress 2.7.1 and everything went without a problem :/

    I’ll check other versions of the plugin and do some online test as well.

    Do let me know if you run into problems again.

    Thanks! :)

    Reply
  88. Netbook Review

    I think I have the plugin active now… however, I wanted to try and do something different.

    If you go to my site you can see the decategorizer appears to be working. The categories are gone – and I don’t need to worry about Google search results etc. because these are all automatically 301’d right?

    In any case, what I’m trying to do is have the category go like:

    http://www.netbookreviews.com/reviews/acer
    http://www.netbookreviews.com/reviews/asus
    etc.

    Then for non computer manufacturer / review type categories just go:

    http://www.netbookreviews.com/category/netbook-news

    (or is it stupid to do this and instead I should just have category removed at all times?)

    Perhaps it’s smarter to just have it gone for SEO purposes? Please advise thanks!

    Reply
  89. Pingback: How do you change the wordpress category URL on a by category basis?

  90. Travis

    Hi aesqe,
    I’m having an issue that I don’t think anyone has mentioned yet.

    I’m using your plugin (latest version of it and WP) to remove /category/ base from my urls. Works absolutely beautifully (the only plugin that does).

    But an issue arises when trying to paginate a static page from then on. I have a couple static pages with custom queries loaded through page templates. The /page/2 and so on generate a 404 while Decategorizer is activated. Works fine while it’s deactivated.

    I understand why a static-page/page/2 might get confused as a category and therefore break the pagination, but I have no idea how to fix this.

    I’m running out of time on this job and would appreciate any wise words you could share, so I can sleep a little sounder at night ;)

    Thanks a ton!

    Reply
  91. aesqe Post author

    @Netbook Review:

    You could disable Decategorizer and use pages with custom templates instead of categories for reviews, but that’s just me complicating stuff :)

    I think you’re better off without “category” completely.

    Reply
  92. Travis

    @aesqe

    My permalinks are setup as = /%category%/%postname%/

    Nearly every post is categorized under a sub-category (domain.com/parent/sub/post-title)

    And no, none of the pages and categories have the same names or urls.

    Reply
    1. aesqe Post author

      @Travis:

      Ah, I see the problem now.
      Pages don’t have “/my-page-name/page/2/” in URL when paginated, they just have number of the page like “/my-page-name/2/”.
      So, to make your approach work, I should make it possible for users to add page slugs/paths to the “ignore” list, hmm…

      I’ll try to fix it today, I’ll leave a comment here when it’s done.

      Reply
  93. Travis

    Ah, I didn’t think of that. So no /page/ in page urls.

    I tried this (/my-page/2), and the same posts are displayed on each of the paginated pages, so I’m not sure if that will work. My query might just be buggy (I’ll try and fix this today).

    It would be fantastic and greatly appreciated if you could add the page slugs to the ignore list :)

    I’ll then have to figure how how to have wp_pagenavi on pages not include /page/ in the slug, but I’ll worry about that issue when I get there :)

    Thanks again, aesqe.

    Reply
  94. aesqe Post author

    OK, I think that version 0.7.1, which is available in the plugins repository as of few moments ago, should fix your problems, Travis.

    Go to your permalinks settings page and add the list of page paths into the textarea at the bottom of the page and then save changes.

    Please let me know if it works! :)

    Reply
  95. Travis

    Wow. That was an incredibly quick response. Thanks a ton.

    It didn’t immediately solve my problem, but I think that might just be because I’m using a buggy query method. I’ll try and fix it over the next 24 hours and update you, whether or not worked.

    Again, a huge thanks for such a quick fix (and mentioning my name in the update log ;)

    Reply
  96. Travis

    Okay, managed to give it a try, and it doesn’t seem to do the trick. Here’s my setup:

    1) I’m using a paginated query from here = http://weblogtoolscollection.com/archives/2008/04/19/paging-and-custom-wordpress-loops/

    2) My static page’s URL is http://domain.com/news/

    3) When Decategorizer is not activated, the pagination on the News page’s query works like a charm (../news/page/2/).

    4) When your plugin is activated, page 2 returns a 404.

    5) So with your latest update, I thought adding “/news/” to your new settings field under the permalinks page would fix it, but it doesn’t seem to make any difference.

    I’m not 100% sure I didn’t miss a step, and would love to hear if I did and am attempting it correctly.

    Thanks, aesque.

    PS – you should add a “subscribe to comments” plugin so readers can easily stay in the loop on new comments :)

    Reply
  97. aesqe Post author

    @Travis:

    could you please take a look at the Decategorizer group within Redirection plugin’s settings and tell me if you see the string /news/|^ within the main redirection (the regular expression string that starts with (?!^/[\d]{4}/|^/)?

    I’ll go add a subscribe to comments plugin ;)

    Reply
  98. Travis

    No, that string was not created and does not exist.

    If I manually create it, would that do the trick? And what would the settings be for the source url, target url, match, and action?

    ~ Thanks for the subscribe button :)

    Reply
  99. aesqe Post author

    Yes, you can manually add /news/ into the main regexp, but before you do, please try deactivating and reactivating the plugin manually, see if that solves the problem.

    If that doesn’t do it, go to Decategorizer group inside Redirection settings and find a redirection whose source looks something like this:
    (?!^/[\d]{4}/|^/tag/|^/author/|^/search/|^/comments/|^/category/|^/page/)^/(.+)/page/([\d]+)([/]?)((\?.*)?)
    and add
    |^/news/
    just after the
    |^/category/|^/page/
    part. So, in my case, the complete regular expression would look like:
    (?!^/[\d]{4}/|^/tag/|^/author/|^/search/|^/comments/|^/category/|^/page/|^/news/)^/(.+)/page/([\d]+)([/]?)((\?.*)?)

    I still don’t understand why the redirections haven’t updated automatically…

    Hope this helps!

    And I should be thanking you for the subscribe by mail suggestion :)

    Reply
  100. Dominic Desbiens

    Hi,

    It’s me again. The plugins works great again. But, since one week, i have to deactivate a reactivate the plugin cause my categories shows a 404 error. After reactivating the plugin, all works again. I have to do that some times every day. Any idea of the problem?

    I haved some problems with my hoster since two weeks. My web site was down many times. Is this could be the problem?

    Thanks

    Reply
  101. Travis

    Latest release works like a charm, whether in a sub-directory or the root.

    Great response time and work! :)

    Reply
  102. Dominic Desbiens

    Any ideas for my problem? I have to desactivate and reactivate the plugin at least one time every day cause the categories are broken and shows 404 error. After reactivate it is ok…

    Reply
  103. aesqe Post author

    @Dominic:

    I don’t have a single clue as to why this is happening to you, I’m sorry :/

    Next time you get a 404, please check the Redirection plugin’s options page and see if the Decategorizer group exists. If it does not exist or it’s empty, then you should definitely talk to your web host and see how that could have happened.
    Are you perhaps hosted on Dreamhost?

    If the redirections are in place, then I’ll have to think of something else…

    (I apologize for the slow reply, I’ve been mostly offline for the past two days because my router had decided it’s time to die.)

    Reply
  104. Dominic Desbiens

    Haaa computers !!

    I already take a look at the redirection group. I seen that it was there (it have 18 items). But i dont know if the group is still there when the 404 error become.

    I haved just to reactivate again this morning the plugin to that works again. Next time, i will look if the redirection group is there.

    I will see too if this happen to my other parent category (i have to parent categories, no posts are in theses one. All posts are in subcats).

    Finaly, im not on Dreamhost…

    Reply
    1. aesqe Post author

      @Dominic:

      Here’s a quick plugin which will print the WordPress query string and request in a HTML comment in your footer. Please activate it and then I’ll take a look at the comment in your site’s source. Hopefully, this will give me some more info about the problem.

      http://skyphe.org/wp-content/uploads/2008/06/sq_sr.zip

      As far as I can tell, the 301 redirections work, but not the category one’s.

      We’ll solve this, don’t worry :)

      Reply
  105. Dominic Desbiens

    Hi,

    Unfortunally, i read this reply after reactivated the plugin again. I have just installed your plugin for query and we’ll see what will happen.

    I look at the source of the page, it give something like that :

    I suppose that you know what it mean :o)

    Mister, i really thank you for this support for your plugin. If all developpers was like you, all would be so great in this (sometime a little bit complicated) world…

    Thanks

    PS. Next time that my subcats will returns a 404 error, do you want i post here any thing about the query plugin?

    Reply
  106. Matt

    Hello,

    I’m having an issue with one of the category (“wordpress”) which gets redirected to the page “wordpress-plugins”. Is there a way to prevent this ?

    Thank you

    Reply
    1. aesqe Post author

      @Netbook Review:

      It’s not that my plugin is not as good now as it used to be, it’s just that Wp No category base plugin does exactly what I was trying to achieve when I first started working on my plugin. I just didn’t have the proper knowledge then :)

      And to clarify: I’ve got nothing against someone using my plugin because it still fits them better, but the other plugin being faster and standalone, I just thought people who use my plugin should know about it.

      And I will definitely continue to provide Decategorizer support to anyone who needs it, no doubt there :)

      I hope that explains things a bit better :)

      Reply
  107. Utilaje

    OMG
    Today I was looking at my plugins list and noticed this message:
    “THIS PLUGIN IS NOW OBSOLETE, PLEASE SWITCH TO ‘WP NO CATEGORY BASE’ PLUGIN”

    I came back here to thank you for all your awesome work in all this time since I’m using this plugin.

    I wish you all the best !

    Reply
  108. Pingback: jared.thomas.henderson's Bookmarks on Delicious

  109. monica

    Hello, I wonder what plugin are you using to show a list of your categories, and subcategories and pages, because in my site It only shows the first categoy and the posts

    Hope you can help me

    Reply
  110. Dominic Desbiens

    Do you know if the other plugin have an issue about the problem with scheduled posts? (Remember, when a scheduled post was posted, the redirection caused 404 error).

    Thanks for your works on this plugin in the past. Now i understand why you did’nt responded to my last email :o)).

    Reply
  111. Pingback: Top 1000 WordPress Plugin Authors

  112. Pingback: ???????_/%category%/%postname%/

    1. aesqe Post author

      Gabriele: I’ve just tested it with WordPress 2.9.2 and the latest version of Redirection plugin, and it all works just fine :)

      Reply
  113. Joanna

    I’ve got the redirect, decategorize, and no category base plugins all installed and activated but my site still has categories in it – am I doing something wrong?

    Reply
    1. aesqe Post author

      Hi Joanna, sorry I haven’t replied sooner :)

      I recommend either having ‘Redirection’ plus ‘Decategorizer’ installed, – OR – just ‘WP No category base’. I can’t remember if Decategorizer and WP No category base clash, but they probably do.

      Reply
  114. Pingback: ????? ?????? » Blog Archive » ?????? ??? ???????

  115. Willy Duranceau

    This is second incident that I am scanning anything about modifying internet websites with all the system. It seems that you’re an super expert blogger. Your post is definitely an excellent example of why I keep on coming again to review your very good high quality content material that’s permanently up to date.

    Reply
  116. Pingback: Decategorizer | Best Plugins - wordpress – widgets – plugin 2012

Leave a Reply