• Resolved phil404

    (@phil404)


    Currently, I am using the “WordPress Category Archive” plugin with WP 2.9.2 in order to create an archive widget – much like the default Archive widget – that generates a list of years (linked) for posts within a specified category.

    WordPress Category Archive
    http://wordpress.org/extend/plugins/wp-category-archive/

    Permalink configuration:
    /%category%/%year%/%monthnum%/%postname%/

    This very same setup does not work in WP 3.0 when using anything but the default permalink option.

    Have the rewrite rules changed in WP 3.0?

    Thanks.

    -phil

Viewing 15 replies - 1 through 15 (of 35 total)
  • Not as far as I know but the plugin you’re using may no longer be fully compatible.

    Somewhat similar issue with permalinks in WP 3.0 RC.
    http://wordpress.org/support/topic/410466?replies=1

    RC 1, 2 or 3?

    What plugins are you running?

    Thread Starter phil404

    (@phil404)

    The plugin I am using is:

    WordPress Category Archive
    http://wordpress.org/extend/plugins/wp-category-archive/

    The issue described in my original post occurs in RC1, RC2, and RC3.

    Here’s the query that WordPress chokes on:

    http://mysite.com/?m=2001&cat=13

    When permalinks is set to default, WordPress returns the proper posts. When I have permalinks set as noted in my original post, the page essentially refreshes. WordPress 3.0 appears unable to rewrite that query. WordPress 2.9.2 does not have this issue.

    -phil

    RC3

    Fixed – it was the Redirection plug-in.

    Thread Starter phil404

    (@phil404)

    Glad YOUR problem has been resolved, bsuneja.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Tagging this wp-category-archive so hopefully the plugin author will see, but this is likely something they need to fix 🙁

    I see you posted at http://www.prdream.com/wordpress/?page_id=1511 so … there’s some hope 🙁 Sorry, man.

    Thread Starter phil404

    (@phil404)

    Thanks, Ipstenu.

    It’s easy to dump this issue on the plugin, but obviously something has changed in WP between 2.9.2 and 3.0, to break the functionality. Specifically, something to do with how WordPress handles rewrites.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Oh, I’m not denying that at all! A lot has changed (see http://codex.wordpress.org/Version_3.0 for a mostly complete list). But at the end of the day, WordPress works fine, and it’s the plugin that has a problem.

    Which sucks. Now this could be an error on WP’s side, sure, but most of the time these tend to be plugins making weird calls that they shouldn’t have been in the first place.

    What happens when you turn off and turn back on the plugin? Does WP kick out any errors? What’s in your .htaccess? Are you using SingleSite or MultiSite? Do you have any other plugins that modify htaccess/permalinks installed? Is the link generated the RIGHT link?

    Also, what version of the plugin are you using? The 1.3.0 version looks like it came out 10 days ago.

    Thread Starter phil404

    (@phil404)

    Thanks, Ipstenu. Your feedback is much appreciated.

    What happens when you turn off and turn back on the plugin?

    No change.

    Does WP kick out any errors?

    No error. With permalinks configured as follows:

    /%category%/%year%/%monthnum%/%postname%/

    the link generated by the plugin (/category-slug/yearnum/monthnum/) appears to confuse WordPress, which redirects back to the requesting page.

    When the permalinks option is set to default, the link generated by the plugin (?m=####&cat=###) returns a page with the correct content: all posts belonging to cat x for year ####.

    What’s in your .htaccess?

    Pretty sure it’s the standard WP generated .htaccess :

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    Are you using SingleSite or MultiSite?

    It’s a single site installation.

    Do you have any other plugins that modify htaccess/permalinks installed?

    I do not.

    I would love to hear back from the plugin’s author on this matter, but it appears the only way to contact him is via the comments on his plugin page. Until then, I’m merely trying to pinpoint the change in WP that renders the plugin incompatible.

    -phil

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Actually this line looks weird:

    RewriteRule ^index\.php$ - [L]

    This is my .htaccess (taken from a fresh install of WP).

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    I don’t THINK this is the ish, but it can’t hurt!

    What about other permalinks? Like the standard pretty ones? Or .. is this permalink set someplace other than the WP settings and somewhere in the plugin config?

    Is there a way in WordPress 3.0 to show a page with posts for one specific category for a particular year and month with permalinks set?

    If permalinks is off, the WordPress Category Archive plugin creates a link in the format

    ?m=%year%%monthnum%&cat=%categoryid%

    This works fine for all the versions of WordPress I have tried: 2.8, 2.9.2, 3.0RC3, …

    If permalinks are on and they contain the %category%, %year% and %monthnum%, the WordPress Category Archive plugin creates a link in the format

    /%category%/%year%/%monthnum%/

    This works in WordPress 2.9.2, but not in 3.0 RC3. In 3.0 it gets redirected to

    /category/%category%/

    WordPress provides functions for getting the permalink for a month (get_month_link) or a category (get_category_link), but nothing for both (get_category_month_link?). So the WordPress Category Archive plugin has to guess what it should set the link to.
    -Hugh

    Thread Starter phil404

    (@phil404)

    Hugh,

    Are you saying that WP 3.0 is missing a function that was present in earlier versions, resulting the failure of your plugin with certain permalink configurations?

    No, WP3 isn’t missing a function. WP3 seems to be handling a URL with %category% and %year% differently than WP2.9.2. Not sure if it is a mod_rewrite issue in .htaccess.

    With permalinks set to

    /%category%/%year%/%monthnum%/%postname%/

    going to the page

    /%category%/%year%/%monthnum%/

    on 2.9.2 will show a list of posts for the category for the specified year and month.
    On 3.0 it will redirect to

    /category/%category%/

    Which shows a category’s post, but not filtered for a specific year and month. So there is probably something different in how the WordPress 3.0 code handles permalinks.

    I am not sure how to update the plugin to work with 3.0. Would require digging around in the WordPress code.

    Thread Starter phil404

    (@phil404)

    Thanks, Hugh. That was clarification I was seeking. Hopefully, someone is the know will provide you with the info you need to update the plugin for 3.0.

Viewing 15 replies - 1 through 15 (of 35 total)
  • The topic ‘Permalink rewriting in 3.0’ is closed to new replies.