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: 880
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 » Sun Oct 12, 2008 6:05 am

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 » Sun Oct 12, 2008 6:45 pm

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
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Mon Oct 13, 2008 7:36 am

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
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Mon Oct 13, 2008 7:58 am

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: 880
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Post by utelle » Mon Oct 13, 2008 10:15 am

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

Thanks for explaining and solving the issue.

Regards,

Ulrich

Post Reply