• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Own posts appearing as unread

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm seeing the following bug:

When I create a new post it appears as read, when I then shut down my browser (and make sure I clear the session cookie), and log in again my own post appears as unread.

This does not happen when I try the same thing on the jforum.net JForum installation, so I'm assuming this is happening due to the fact that I'm using SSO.

Reading through the code I see that a message is read if:

- User.getLastVisit is later than the post time
- The message is marked as read in 2 maps on the users session

As far as I can see the maps are cleared everytime a session is created so I suspect the problem is in the getLastVisit time. I can see in the database of my installation that it is never updated, and as far as I can see in code it is only written to the database when UserDAO.update is called, which is only called when a user changes his profile. In the UserAction the last visit time is set on login, but as far as I can see it is not set when a user logs in using SSO.

How is the last visit time supposed to work (if it is not updated after every action I do then my own posts would still appear as unread as they were per defenition posted after I logged in)? What can I do to fix my problem?
[originally posted on jforum.net by jrouwe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, found the bug: UserSession.updateSessionTime() is never called when you have SSO enabled.

The correct code in ControllerUtils should be:



(see comment marked with Jorrit: ...)
[originally posted on jforum.net by jrouwe]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic