Page 1 of 1

Strange note on forum front page when not logged in

Posted: Sun Oct 12, 2008 6:05 am
by utelle
Since 2 days I see the following note on the front page of the forum:

You have 2 unaccepted question(s), click here to view and close them.
Please click the accept (...) or assist (...) button on the post that solves your question.

After logging in the note vanishes.

I'd like to know what's causing this note.



Posted: Sun Oct 12, 2008 6:45 pm
by Jorg
Somehow the session database is screwed up and thinks a not logged in user has unanswered questions (the one that are not marked as accepted). It is weird though that it would do that with sessions where no person is logged in. Maybe a null reference to a user in the DB somewhere?

- Jorgen

Posted: Mon Oct 13, 2008 7:36 am
by upCASE
Strange, yes.
I implemented this so it gets the unaccepted post count for a specific user based on the user id, if there are replies to this post.
What's strange is that
1. There should be no result if you're not logged in, as there should be no user id given...
2. Both posts relate to a user that does not exist anymore (after requesting an email change, I guess Jorg deleted the double account).

I'll do a quick check and see why this happens.

Posted: Mon Oct 13, 2008 7:58 am
by upCASE

Sorry for knocking the forum off :-)
Hacking got me and I accidentally left a "," after some lines of code...

Check it again now, it should work.
For now it checks if there's a user id given. But it's still a bit confusing that there is an entry with a non existent user id.

Posted: Mon Oct 13, 2008 10:15 am
by utelle
upCASE wrote:Check it again now, it should work.
It does!

Thanks for explaining and solving the issue.