author pages not displaying "old" content

Found a bug? Tell us!!
Post Reply
defuru

author pages not displaying "old" content

Post by defuru »

hello there s9y community,

allthough my blog has only been running for around 2 weeks i am having the following problem/bug as there are multiple authors using the blog:
in the author view (ie when you click on a authors name) i can not browse older entries. i currently have 34 entries and each page should display 15 of these as set in my configuration.
looking at the bottom of my authors page (index.php?/authors/1-defuru) the blog will link the "next page" (i assume thats what it would be as i use a german version) to P2.html (index.php?/authors/1-defuru/P2.html). rather than displaying the 15 older entriest page2 still displays the same content as the supposibly named original authors index (index.php?/authors/1-defuru). the only thing different now ist that the "next page" link will now linkt to /P2/P2.html (index.php?/authors/1-defuru/P2/P2.html), and at that point it will loop and allways link to the /P2/P2.html

now i dont know if i have set up anything completly wrong or if i missed a post on this (it's probably a stick with big fat letters and i overread it ;) ). if anyone can point me to a solution here or if this has been reportet please do so.

you can check these happenings at my blog at http://www.rauschkinda.at (caution german).

thanks for the help
defuru
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: author pages not displaying "old" content

Post by garvinhicking »

Thanks for reporting this bug! Indeed it was a fault by Serendipity, I just committed a fix.

It will be part of an upcoming maintenance release, but you can already easily fix it by editing your index.php file.

Find this code:

Code: Select all

} else if (preg_match(PAT_AUTHORS, $uri, $matches)) {
    $serendipity['GET']['viewAuthor'] = $matches[1];
    $serendipity['GET']['action'] = 'read';
and then you can replace it with this:

Code: Select all

} else if (preg_match(PAT_AUTHORS, $uri, $matches)) {
    $_args = $serendipity['uriArguments'];

    /* Attempt to locate hidden variables within the URI */
    foreach ($_args as $k => $v){
        if ($v == PATH_AUTHORS) {
            continue;
        }
        if ($v{0} == 'P') { /* Page */
            $serendipity['GET']['page'] = substr($v, 1);
            unset($_args[$k]);
            unset($serendipity['uriArguments'][$k]);
        }
    }

    $serendipity['GET']['viewAuthor'] = $matches[1];
    $serendipity['GET']['action'] = 'read';
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
defuru
Posts: 2
Joined: Sun May 08, 2005 4:13 pm

Post by defuru »

thanks garvin for the quick fix, works like a charm now :)
Post Reply