Page 1 of 1

author pages not displaying "old" content

Posted: Fri May 06, 2005 4:09 pm
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

Re: author pages not displaying "old" content

Posted: Mon May 09, 2005 11:46 am
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

Posted: Mon May 09, 2005 12:30 pm
by defuru
thanks garvin for the quick fix, works like a charm now :)