Closed (fixed)
Project:
User Stats
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2012 at 16:18 UTC
Updated:
17 Jun 2013 at 03:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
ksemihin commentedHi, I try to fix this problem in file views_handler_filter_is_online.inc
I commented out the following line in the code and problem has been resolved for me.
Comment #2
paul_constantine commentedSuper, that worked.
Thank you for the patch.
Regards,
Paul
Comment #3
ksemihin commentedThere is a second way.
In Views display, configure filter criterion: Global: PHP >>> with this code:
Comment #4
paul_constantine commentedLost me here.
Did not find the filter option "Global: PHP" anywhere.
PHP is enabled.
Comment #5
ksemihin commentedYou must install and turn on this module before use Filter PHP
http://drupal.org/project/views_php
Comment #6
paul_constantine commentedThe php filter works even better! Much more responsive!
Now I can filter who is online.
Now if I could only find a way to reduce the display to the confirmed relationships of the "current user". All these requestee and requester options work only half the time. I really don't care who started the relationship, just show the friends of the current users who are online now. But I am rambling, this is the wrong place for this anyway.
Thanks for the help with the online status. Views_php is great.
Best wishes
Paul
Comment #7
fraweg commentedHello,
for me this patch only hide the error message. But I still can not filter online user. In my view there is always shown one user witch is offline. This view have worked before. Don't know why is is so now.
So I set this thread to "acive"
here is my view, and there is also a screenshot:
Thanks for any help!
Best regards
Frank
Comment #8
fraweg commentedComment #9
fraweg commented:-( No support in that issue ?
Comment #10
fraweg commentedComment #11
markusk commentedSame problem here. The filter was working for me in Views 3.3, updating to Views 3.5 broke it. As Views 3.5 is out for 5 months now and the bug is still not fixed, I raised the priority. A module related to Views should really fix severe problems that pop up with a new Views version in a shorter time.
Looking at the issue queue of this module it seems like it's has major flaws without a chance that they are getting fixed soon. And it quite looks like this module ist about to be abandoned by its maintainer as many issue are still waiting for a response. That's to bad, because the module would be very useful - if the existing problems get fixed.
I'm puzzled by the fact that I couldn't find another module providing an "is online" filter to views. I need user pictures an other profile fields in such a block, so the default block of core does not fit my needs. Does anybody know another solution for this problem?
Anyway, I tested the views_php filter: it works for me for administrator accounts, but other roles can't see the block at all - although there is no special permission in place. Am I missing something here?
Comment #12
fraweg commentedHello markusk,
I am also sad that there in no activity in this module :-( I hope someone can fix this..I am not a real developer so it is not possible for me.
At the moment I use a workarraund based on the "user access filter"
I will attach my view so you can reproduce this...I hope this helps until there is a patch here..
Best regards
Frank
Comment #13
markusk commentedHello Frank,
thanks for your export, it's doing the trick for me! What I was missing was the ">=-5 minutes" filter.
Regards,
Markus
Comment #14
fraweg commentedHmm..it should be there..you should be able to set a filter "user last acces" with "Is greater than or equal to " option...?
Best regards
Frank
Comment #15
markusk commentedI was a bit unclear here: I did try it with other relative dates, but for some reason I didn't try the "-x minutes".
Comment #16
fraweg commentedok..now it woks?
Comment #17
markusk commentedYes, like a charm.
Comment #18
liam mcdermott commentedThanks very much for reporting this!
I'm marking: #1691964: Fehlermeldung SQLSTATE[42S22]: Column not found: 1054 Unknown column 'IF1342654577MAXsessions.timestamp300101' in 'having claus as a duplicate of this (and downgrading priority; critical is generally for stuff like white screens of death on the front page, insanity-level, 'OMG the world is ending!' kind of bugs).
A colleague and I struggled for most of yesterday with this, it's harder than you might think. We're pretty close to a solution though. :)
Comment #19
liam mcdermott commentedMarking #1539590: Views field is_online reduces result to one row as a duplicate of this issue.
Comment #20
liam mcdermott commentedComment #21
liam mcdermott commentedAnd here's a patch!
Comment #22
liam mcdermott commentedOh and I forgot to mention, this patch depends upon #1512488: Possible to use add_groupby without add_having? being fixed.
Comment #23
fraweg commentedHello,
Does this mean this patch currently not working ans you wait for a solution in views?
Best regards
Frank
Comment #24
liam mcdermott commentedYes, although the Views issue has a patch, so you can apply that patch to Views and everything (should) work.
Comment #25
fraweg commentedOk,
thanks for yor work!
Best regards
Frank
Comment #26
markusk commentedSorry for #18. By setting it to "critical" I referred to the issue queue handbook's item "blocks not displaying" which was exactly what was happening to me.
Anyway, very nice to see this problem fixed! Will have a look at it soon.
Markus
Comment #27
lucasgladding commentedI just committed the update, and it seems to fix the issue. Please let me know if anyone discovers any issues.
Lucas (the colleague)
Comment #28
lucasgladding commentedComment #29
manicato commentedIt is a little bit confusing that the last patch #21 has nothing to do with the committed update.
Nevertheless the committed update works like charm. :-)
Comment #30
lucasgladding commentedLiam and I were working on the problem at the same time, and the code is different for filters and sort criteria, so there were other changes made since the patch was posted. Sorry for the confusion. On the bright side, Liam has more help with the module now. :)
Thanks again for the confirmation.
Comment #31
playfulwolf commentedI was having the same issue with older dev, current (march 9th) release did NOT solved it
getting
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') < 900, 1, 0)) AS users_node_is_online FROM node node LEFT JOIN users users_no' at line 1on any view - complex or simple
Comment #32
liam mcdermott commentedThanks for reporting there's still a problem, just to make sure: did you apply the Views patch mentioned in #22?
Comment #33
playfulwolf commentedno.
Comment #34
liam mcdermott commentedAh, well sadly without that patch applied to Views the is_online filter won't work.
Comment #35
antoinetooley commentedinstalled this module today and I also am getting the SQL error. Looked at the patch in #22 and it seems that most of it is already applied apart from on the views_handler_filter_is_online, but the code I have doesn't match what is in the patch so I can't apply it (I always add patches manually so might be missing something). Any help would be greatly appreciated! cheers.
Comment #36
liam mcdermott commentedHiya saintslash, the patch has been committed to User Stats, it's Views that needs patching. Maybe you're looking at the wrong reply?
Comment #37
antoinetooley commentedsorry your right I was trying to apply the patch in #21 :/!
Ive now applied the patch in the link on #22 and Im still getting the same syntax error.
Any ideas?
cheers
Comment #38
liam mcdermott commentedI suspect it's possibly something else then. Would you mind creating a new issue, with an export of your View (pasted into a .txt file) attached?
Thanks!
Comment #40
TheMGamer commentedI have the same issue
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') < 600, 1, 0) = '1') )))) subquery' at line 2
Comment #41
liam mcdermott commentedHello TheMGamer, thanks for reporting there's still a problem, just to make sure: did you apply the Views patch mentioned in #22?
Sadly, it appears the problem won't be fixed in Views without tests and I'm not sure what's required or how to write a test 'in order to be sure that your change fixes the issue.' The code is so obviously wrong, it's almost like writing a test to ensure 1 + 1 = 2 so I gave up at that point. But then, I probably just don't understand what's required.