Strange note on forum front page when not logged in Topic is solved

The Forum Rules, general FAQ and questions or comments about the forum are posted here.
Post Reply
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Strange note on forum front page when not logged in

Post 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.

Regards,

Ulrich
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post 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
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!
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.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Hi!

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.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
utelle
Moderator
Moderator
Posts: 1125
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle »

upCASE wrote:Check it again now, it should work.
It does!

Thanks for explaining and solving the issue.

Regards,

Ulrich
Post Reply