problems with the authors-view

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
hkit
Regular
Posts: 25
Joined: Mon Oct 10, 2005 11:20 am

problems with the authors-view

Post by hkit »

Hi there,

I made a few changes in the fetch-entries-function. Now, if I select the author underneath each article nothing changes, the view stays the same, whatever author I select.
My question is: is the section which does enables that, this one in the fetch-entries-function:

Code: Select all

if (isset($serendipity['GET']['viewAuthor'])) {
        $cond['and'] .= " AND e.authorid = ". (int)$serendipity['GET']['viewAuthor'];
    }
I can't think of any other; I didn't edit or change anything in that section. What I edited was the range-section. At which parts of this function do I need to have a look to solve this problem?
Would be very kind of you if somebody has an idea

thanks a lot
Stefan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: problems with the authors-view

Post by garvinhicking »

Hard to say what actually broke it. Can you check if $serendipity['GET']['viewAuthor'] is properly set when inside the fetchentries function? Because maybe it does not get properly set in the index.php file.

And yes, inside the function, the piece of code you showed is responsible for only showing entries by author.

An indicator that your index.php is broken wuld be that your s9y header does not show "Showing entries from autor XXX" in the header. DOes it show that?

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/
Guest

Re: problems with the authors-view

Post by Guest »

garvinhicking wrote: An indicator that your index.php is broken wuld be that your s9y header does not show "Showing entries from autor XXX" in the header. DOes it show that?
Hi Garvin,

thanks for your help. It does show that. If you want to have a look at it: http://www.deutschland.se

I commented out some lines of code in the entries.tpl, could it be that maybe accidentally I just removed some important lines?

best regards
Stefan
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: problems with the authors-view

Post by garvinhicking »

Usually the template files do not tell which entries to display; so it should only be your fetchentries function malfunctioning.

Print the SQL query of fetchEntries() before it's send to the server, and see if the "viewAuthor" code line gets inserted?

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/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Just visited the site. The links for authors exist; they look correct to me (index.php?/authors/3-Deutsche-Botschaft). Clicking them just takes me directly back to the start page. I don't see the "Showing entries from author XXX" in the header.

Could it be a .htaccess issue?
Judebert
---
Website | Wishlist | PayPal
Post Reply