Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post [Fixed] New Count 'stuck' And Can I Impersonate A User? 
 
The new site is going fairly well, but I have a strange problem with a few users and the 'New messages count', which shows in the navigation link of the forum page, and, of course, the results page.
They're getting hundreds of new posts, even though they've logged out and logged in serveral times. I can't emulate this problem, because it works for me  

I have two cases; both are using Firefox on Windows. Their profiles show 'Last visit' dates in August, close to the switch over date, but the 'Advanced statistics' panel shows them logged in today, qith a history of logins daily for weeks. I've asked them to log out/log in again, and use the 'Clear cookies' link, including shutting down the browser, but they're still stuck.

One (very) useful function, available in Drupal, is for an admin to be able to 'impersonate' a user, that is switch ID temporarily to that user so that the admin 'sees' what the user sees. Is something like this available?

Why does the 'Last visit' date not match the most recent statistics date?

Any ideas, before I fire up the debugger?

John
 



 
Last edited by jhl on Fri 21 Sep, 2012 21:21; edited 1 time in total 
jhlSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: New Count 'stuck' And Can I Impersonate A User? 
 
There's more than that wrong with it.

Say there are 16 new posts and one marks all forums as "read", when one gets back to the forum it still has 16 showing.

So yes, it appears to be buggy.
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: New Count 'stuck' And Can I Impersonate A User? 
 
i confirm that mort.

aswell happens, that some posts appear saying that there´s no messages in that topic, even when it says in new messages view ( search) that there are 5 messages in that topic.
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: New Count 'stuck' And Can I Impersonate A User? 
 
jhl, make sure their browser is accepting cookies correctly. Can you just ask them to try with another browser/pc? Regarding the request to "impersonate" a user, with the new user class it should be possible by instantiating a new $user class and temporarily store personal user data to another array... It has not been implemented yet, if you wish you can try to do it. The real issue with that approach is that you should also create a new "dummy" cookie with all user data, which it is simply not possible because cookies are stored on another pc and there are no data regarding cookies in the DB, so you cannot know what the real situation is for that user.

mort, spydie, as specified in another topic, NEW is different from UNREAD (a new message is a message posted after your last visit regardless it has been read or not, an unread message is something you didn't read, or marked back as unread). If you want to keep track of all unread posts, the only solution is UPI2DB.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: New Count 'stuck' And Can I Impersonate A User? 
 
MG, i´m having this issue on Icy.es

Using Upi2DB there by default.

even in the forum, if i browse to a specific Post via forum list and topic list , it shows me only the last post of that topic, and where´s no way to see the rest of that posts.

but this happens only to some topics, not to all of them
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: New Count 'stuck' And Can I Impersonate A User? 
 
Mighty Gorgon wrote: [View Post]
jhl, make sure their browser is accepting cookies correctly. Can you just ask them to try with another browser/pc?


Already done, they have tried IE and Chromium (though I cannot confirm, because I can't see their computer). I have one user who seems to have fixed the problem using the 'Remove cookie' link, but three who are *still* stuck.

The diagnostics seem to be that:
1. New (x) worked previously, IP 1.3.0.53b till the switch over, in mid August (16th IIRC)
2. After upgrading to IP 2.0.0.86 four users have reported this problem - but there may be more who have not shouted out. All Windows, 1 Firefox, 1 Chromium, 1 IE8. Two have switched browser, to no avail. All have tried using the 'Remove cookie' (Elimina cookie in italiano) link, only one worked, and he already had a 'Last visit' date of yesterday, not the middle of August. The other three have 'Last visit' dates prior to the switch over (prior by about 1-3 days).

It's like the logout function doesn't get called for them - perhaps their cookie gives a 'unregistered user' value? I'm looking at the code, but struggling to understand what comes from where, DB or cookie.

Mighty Gorgon wrote: [View Post]
Regarding the request to "impersonate" a user, with the new user class it should be possible by instantiating a new $user class and temporarily store personal user data to another array... It has not been implemented yet, if you wish you can try to do it.


I might at that. It may help in some debugging situations, but will need a new field in the DB. Admins only, of course. It depends if a different 'quick fix' fails...

Mighty Gorgon wrote: [View Post]
The real issue with that approach is that you should also create a new "dummy" cookie with all user data, which it is simply not possible because cookies are stored on another pc and there are no data regarding cookies in the DB, so you cannot know what the real situation is for that user.


OMG Luca, how much stuff is stored in the cookie???!!! Here on IP, my cookie says:
cookies


which doesn't seem too much. Topics read/unread in icyphoenix_t, I imagine. _u is user, _sid is sid, but _k? I don't think the __umtx values have anything to do with IP, though goodness knows where else they come from...

I'll see if I can get those users to screenshot their cookie values. Then I will ask the users to delete the cookie via the browser. This is a quick fix of course, but the original problem still remains - if it can be confirmed by other users of IP 2.x, of course.

If that doesn't work, I'll try duplicating the cookie value of a user, then impersonating him/her. Really the only values not from the DB anyway are _t and _k, right?

Mighty Gorgon wrote: [View Post]
mort, spydie, as specified in another topic, NEW is different from UNREAD (a new message is a message posted after your last visit regardless it has been read or not, an unread message is something you didn't read, or marked back as unread). If you want to keep track of all unread posts, the only solution is UPI2DB.


mort, spydie See http://www.icyphoenix.com/viewtopic.php?f=2&t=8651 and http://www.icyphoenix.com/viewtopic.php?f=10&t=8136

John
 



 
jhlSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: New Count 'stuck' And Can I Impersonate A User? 
 
Well, I've set the 'Last Visit Refresh If Session Expired' ACP parameter to true, and for most users this has unblocked the problem. I still have one user (a very regular user) who is still blocked however.
He has a last logged in date prior to the upgrade, and despite logging in/out, clearing the cookie, he still is stuck.

I'll try forcing the DB.

I checked the previous version code against the new code, and essentially I think the new code should have 'Last Visit Refresh If Session Expired' set to true as default (not false as it is now) as this better emulates the behaviour of the previous version. Took me a while to find that parameter...

John
 



 
jhlSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Fixed] New Count 'stuck' And Can I Impersonate A User? 
 
After changing that flag, all users have now become 'unstuck', so I've changed the title to fixed.

John
 



 
jhlSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Fixed] New Count 'stuck' And Can I Impersonate A User? 
 
So it was all a problem of 'Last Visit' information not updated ? Then when someone was visiting the forum it was keeping an old and deprecated information which is why the user was seeing some "old" messages as new ? I'll make some tries, thanks for the tip.
 



 
YrosSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [Fixed] New Count 'stuck' And Can I Impersonate A User? 
 
Exactly Yros. I did spend some time tracking the variable - which I didn't document, and can't remember now   It is used to show the new messages however. Funny thing is though, it doesn't get reset when you logout. So that makes setting the parameter to true compulsory...

John
 



 
jhlSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron