• December has disappeared. Can someone help me fix this?
    I am using the mod_rewrite htaccess stuff with these settings:
    /archives/%year%/%monthnum%/%day%/%postname%/
    I didn’t change them till the problem occured on the 28th I think it was, when I posted something after a week of not having done so. All of a sudden, the site only displayed that one post. I deleted the post, thinking maybe something had gone wrong, and the other’s disappeared. Now, there are only posts from January 2004.
    Any help would be appreciated.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter seraph

    (@seraph)

    here is the rewrite rule generated:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^archives/([0-9]{4})?/?([0-9]{1,2})?/?([0-9]{1,2})?/?([0-9a-z-]+)?/?([0-9]+)?/?$ /index.php?year=$1&monthnum=$2&day=$3&name=$4&page=$5 [QSA]
    RewriteRule ^archives/category/(.*) /index.php?category_name=$1 [QSA]

    I dont think your problem is the mod_rewrite rules. Your old archives work just fine. Your new archives dont work even without the mod_rewrite rules.
    For example:
    https://denial.loose-screws.com/index.php?m=200312 – works, 0.72 style
    https://denial.loose-screws.com/index.php?year=2003&monthnum=12 – does not
    Which leads me to believe that you might not have replaced all the require links in your index.php. I see that wp-blog-header.php is on your server. Is it part of the require in your index.php?

    I’m having a similar problem. I just upgraded from 0.72 to 1.0 last night, and the new mod-rewrite archive style works fine for January 2004 and December 2003 entries, but anything older than that yields a “no posts matched criteria” message.
    After seeing LaughingLizard’s example in the previous post, I checked and my blog is exhibiting the same behavior. Old-school 0.72 style archive query strings (like “m=200311”) work fine, but mod-rewrite strings and 1.0 style query strings (like “year=2003&monthnum=11”) do not.
    I have required “wp-blog-header.php” so I don’t know what else to check for…

    It is very difficult to troubleshoot because I dont have access to your databases. However, try this:
    Put this line at the end of your wp-blog-header.php before the ending php tags (?>):
    echo $where;
    It should look like this on top of your page:
    AND YEAR(post_date)=2003 AND post_date <= ‘2004-01-03 12:21:53’ AND (post_status = “publish”)
    when using index.php?year=2003

    Same here for me. I’ve checked my index.php and I can’t find any missing require links before this line:
    <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?> I have modified the index.php to match my old one, but I can’t find anything I would have missed.
    I don’t think it would be anything after this line since the else part of this is what gives the message: Sorry, no posts matched your criteria.

    LL,
    I put that line in my file if you need an example to look at.
    https://mtdewvirus.com/
    Thanks!

    This is what shows at the top of my page with your string LL:
    AND YEAR(post_date)=2003 AND post_date > '2003-12-28 00:00:00' AND post_date <= '2004-01-03 12:25:46' AND (post_status = "publish")
    For some reason 12/28 is in there! Now…how to fix it?

    This might be a temporary fix for you guys till allusion comes up with a better solution. Off the top of my head:
    Find this line in your wp-blog-header.php:
    } elseif ($what_to_show == ‘days’) {
    and replace it with this line:
    } elseif ($what_to_show == ‘days’ && empty($monthnum) && empty($year) && empty($day)) {
    Hope this helps.
    Peace

    That line is in two places…

    Well, I found out where this goofy date is coming from….
    if ((!$whichcat) && (!$m) && (!$p) && (!$w) && (!$s) && empty($poststart) && empty($postend)) {
    if ($what_to_show == 'posts') {
    $limits = ' LIMIT '.$posts_per_page;
    } elseif ($what_to_show == 'days') {
    $lastpostdate = get_lastpostdate();
    echo $lastpostdate;
    $lastpostdate = mysql2date('Y-m-d 00:00:00',$lastpostdate);
    echo $lastpostdate;
    $lastpostdate = mysql2date('U',$lastpostdate);
    echo $lastpostdate;
    $otherdate = date('Y-m-d H:i:s', ($lastpostdate - (($posts_per_page-1) * 86400)));
    echo $otherdate;
    $where .= ' AND post_date > \''.$otherdate.'\'';
    }
    }

    I added the echos to see what was being calculated and here it is:
    2004-01-03 03:55:08
    2004-01-03 00:00:00
    1073116800
    2003-12-28 00:00:00

    LL, the temporary fix worked. Thanks!

    The fix worked for me as well. I’ll keep checking back to see if Matt has any “official” comments to make, but I’m happy now. Thanks for the help. ??

    Glad it worked! I was off with my girlfriend for her birthday so I could not respond…sorry!

    Thread Starter seraph

    (@seraph)

    didn’t work here :/

    Seraph…I can see December now…did anything change?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘1.0: problems with archives. they’ve disppeared.’ is closed to new replies.