The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

This same file is used both by "index" (or Front Page) and "bin" or (upcoming stories). The only difference in code with the two controllers is the choice conditions for the sql. The "bin" then uses the index.rhtml file for output just like the "index".

It's having problems trying to grab story.user (you're trying to call .login on nil, which means that story.user == nil when you call it). Does each story correctly associate with a user? That's the common problem here: user_id in that story record is non-existent or points to a user that isn't in the database, that type of thing.

Yes, but

Originally Posted by lo0ol

It looks like you have an issue here:

Code:

Submitted by: <&#37;= story.user.login %>

It's having problems trying to grab story.user (you're trying to call .login on nil, which means that story.user == nil when you call it). Does each story correctly associate with a user? That's the common problem here: user_id in that story record is non-existent or points to a user that isn't in the database, that type of thing.

I know that is what is is appearing to happen, but the only difference between this rendering of the "Upcoming Stories" (This page) index.rhtml and the "Front Page" rendering is the condition in the sql. With the offending code commented out, it lists 7 items, so the sql is NOT returning nil. Only these fields do not work. I have looked at the database and all stories fields are populated. (I use MySql Front)

--------------
Later: I checked MySql Front this morning and you are right - There was a user missing from a record. Fixed that and it now works.

Thanks to all who pondered this problem.

Last edited by cparvin; Sep 2, 2007 at 10:51.
Reason: Later Information