#16662 closed defect (bug) (fixed)
Permalinks not working with 'category'
Reported by: | Ipstenu | Owned by: | |
---|---|---|---|
Milestone: | 3.1.1 | Priority: | normal |
Severity: | critical | Version: | 3.1.3 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
Okay, there are a handful of people, MOSTLY on IIS, who are having permalinks problems.
Basically categories don't work. They're finding out when they use /%category%/%postname%/ for permalinks. If they use default (ugly) URLs, it's fine. If they use pretty permalinks with /%year%/%month%/%day%/%postname%/ the post URLs work but the category ones do not.
I can't reproduce it, but so far I've noted
If they use IIS, this often fixes it
http://wordpress.org/extend/plugins/permalink-fix-disable-canonical-redirects-pack/
It manifest as EITHER 404s OR a refresh-loop.
I'm not sure if it's really a bug or not, and since I can't reproduce it, I'm gonna list the slew of posts with this problem. Yes, they've tested with the default themes, and that doesn't help.
http://wordpress.org/support/topic/category-permalinks-after-31-upgrade-not-working
http://wordpress.org/support/topic/wp-31-permalinks-still-broken-after-many-trys-with-fixes-described
http://wordpress.org/support/topic/permalinks-broken-and-images-not-showing-with-network-install
http://wordpress.org/support/topic/worpress-site-will-not-stop-refreshing
Attachments (3)
Change History (26)
#3
@
14 years ago
Some more information to help you reproduce this - I got this on one of my blogs when I upgraded to 3.1. It is on an Apache server. All the category / tag pages now give a 404 error when accessed from the existing URLs.
WordPress address (URL): http://www.[MYBLOG].co.uk/blog Site address (URL): http://www.[MYBLOG].co.uk Permalink custom structure: /blog/%year%/%monthnum%/%day%/%postname%/ Category base: Tag base:
Update (the category links in the posts are now consistent with the actual category locations (maybe I was looking at a cached page previously) - so the issue now is that the urls changed from '/blog/category/...' to '/category/...' when WP was updated.
The categories were previously in this form:
http://www.[MYBLOG].co.uk/blog/category/japan/
Now they have moved to:
http://www.[MYBLOG].co.uk/category/japan/
If I add 'blog' to the 'Category Base' then all the single posts start giving a 404.
As a temporary workaround I have added a 302 redirect from the location where the categories / tags were previously to their new location:
RewriteRule ^blog/category/(.+)$ http://www.[MYBLOG].co.uk/category/$1 [R=302,L] RewriteRule ^blog/tag/(.+)$ http://www.[MYBLOG].co.uk/tag/$1 [R=302,L]
Maybe I'll make this a 301 redirect as the category/tag URLs do look better without the 'blog'.
However adding an entry to the 'Category base' still shouldn't cause all posts to 404 - especially as the category has no part in the post URL.
#5
@
14 years ago
- Severity changed from normal to critical
I've been unable to reproduce. If someone is willing to give me access to an install where I can reproduce it, I should be able to track this down. My email is my username here, at wordpress.org.
#6
@
14 years ago
Looking at those threads, the category problems seem to be with certain plugins, particularly Simple Tags. Simple Tags just pushed a new version that I can't reproduce the problem with. The refresh loops are probably #16639.
#8
@
14 years ago
- Keywords has-patch added
In 3.0.5, for categories we have used $this->front which includes the static string included in the permalinks whereas in 3.1 we have set with_front => false
In case of @reviewmylife,
3.0 -> category urls are like /blog/category/
3.1 -> category urls are /category/ due to the with_front => flase
#10
@
14 years ago
That could be the cause for 404's. Not sure what is causing infinite redirect loop.
#12
@
14 years ago
Verified that 3.0 includes front and 3.1 does not. 16662.2.diff makes 3.1 category links look like 3.0.
#14
follow-up:
↓ 15
@
14 years ago
I gave the 16662.3.diff patch a go on a test blog.
The URLs were changed so they now are in the form '/blog/category/' as before. However if I go to any of those URLs I get a 404.
If you want debug logging out of my site I'm happy to install a debug (logging to file) version of taxonomy.php or rewrite.php if give me the code.
#15
in reply to:
↑ 14
;
follow-up:
↓ 17
@
14 years ago
Replying to reviewmylife:
I gave the 16662.3.diff patch a go on a test blog.
The URLs were changed so they now are in the form '/blog/category/' as before. However if I go to any of those URLs I get a 404.
If you want debug logging out of my site I'm happy to install a debug (logging to file) version of taxonomy.php or rewrite.php if give me the code.
16662.3.diff will not work as expected if you have not reverted [16918]
Also, make sure you've flushed your rewrite rules (just visit Settings -> Permalinks)
#16
@
14 years ago
Thanks for the extra details. After reverting that change the categories and tags now work as expected :)
#17
in reply to:
↑ 15
;
follow-up:
↓ 18
@
14 years ago
- Cc ashishsainiashfame@… added
Replying to greuben:
16662.3.diff will not work as expected if you have not reverted [16918]
Also, make sure you've flushed your rewrite rules (just visit Settings -> Permalinks)
I tried your patch (also reverted [16918]) on one of the affected sites but still category and tags pages return 404. Please note that Advanced Permalinks plugin (known to cause issues with WP 3.1) was in use when it was upgraded, so it might have to do something with that. Its disabled at the moment.
I recreated my .htaccess file after making changes in files. Anything else that I should try?
Permalink custom structure: /%postname%/ Category base: cat Tag base:
Edit: My forum thread detailing things is http://wordpress.org/support/topic/wordpress-category-gives-404-after-moving-to-a-different-domain?replies=22
#18
in reply to:
↑ 17
;
follow-up:
↓ 19
@
14 years ago
Replying to ashfame:
Replying to greuben:
16662.3.diff will not work as expected if you have not reverted [16918]
Also, make sure you've flushed your rewrite rules (just visit Settings -> Permalinks)
I tried your patch (also reverted [16918]) on one of the affected sites but still category and tags pages return 404. Please note that Advanced Permalinks plugin (known to cause issues with WP 3.1) was in use when it was upgraded, so it might have to do something with that. Its disabled at the moment.
I recreated my .htaccess file after making changes in files. Anything else that I should try?
Permalink custom structure: /%postname%/ Category base: cat Tag base:Edit: My forum thread detailing things is http://wordpress.org/support/topic/wordpress-category-gives-404-after-moving-to-a-different-domain?replies=22
I've just tried it with /%postname%/ permalink and 'cat' as category base. It is working for me.
Permalinks are broken only if I use that "Advanced Permalinks" plugin. After disabling it did you flush rewrite rules?
#19
in reply to:
↑ 18
@
14 years ago
Replying to greuben:
Replying to ashfame:
Replying to greuben:
16662.3.diff will not work as expected if you have not reverted [16918]
Also, make sure you've flushed your rewrite rules (just visit Settings -> Permalinks)
I tried your patch (also reverted [16918]) on one of the affected sites but still category and tags pages return 404. Please note that Advanced Permalinks plugin (known to cause issues with WP 3.1) was in use when it was upgraded, so it might have to do something with that. Its disabled at the moment.
I recreated my .htaccess file after making changes in files. Anything else that I should try?
Permalink custom structure: /%postname%/ Category base: cat Tag base:Edit: My forum thread detailing things is http://wordpress.org/support/topic/wordpress-category-gives-404-after-moving-to-a-different-domain?replies=22
I've just tried it with /%postname%/ permalink and 'cat' as category base. It is working for me.
Permalinks are broken only if I use that "Advanced Permalinks" plugin. After disabling it did you flush rewrite rules?
Yes I resaved my permalinks. I think they get flushed on visiting the permalinks setting page only or I need to do that explicitly?
#22
@
13 years ago
- Version changed from 3.1 to 3.1.3
Still getting this error, in 3.1.3
http://wordpress.org/support/topic/empty-category-rss-feed-after-upgrade-to-313?replies=1
#23
@
13 years ago
I'm seeing the same error in WordPress 3.1.3 Multisite on two different subdomain-based sites (they're development web sites, so I can't share the urls) on a LAMP server, using the "Day and name" configuration. Both work fine with ugly URLs. There are no category related plugins installed.
Other, non-subdomain sites I've upgraded aren't having this problem.
See also #16639