Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Too bad, the one function I need from this module - "User online/offline" - does not work.
Does anyone have any idea why?
Best wishes,
Paul
Comment | File | Size | Author |
---|---|---|---|
#21 | user_stats-sql-errors-is_online-1796882-21.patch | 3.65 KB | Liam McDermott |
#7 | Bildschirmfoto.png | 56.8 KB | fraweg |
#1 | fix_error_grouping_in_Views_handler_filter.patch | 669 bytes | ksemihin |
Comments
Comment #1
ksemihin CreditAttribution: 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 CreditAttribution: paul_constantine commentedSuper, that worked.
Thank you for the patch.
Regards,
Paul
Comment #3
ksemihin CreditAttribution: ksemihin commentedThere is a second way.
In Views display, configure filter criterion: Global: PHP >>> with this code:
Comment #4
paul_constantine CreditAttribution: paul_constantine commentedLost me here.
Did not find the filter option "Global: PHP" anywhere.
PHP is enabled.
Comment #5
ksemihin CreditAttribution: ksemihin commentedYou must install and turn on this module before use Filter PHP
http://drupal.org/project/views_php
Comment #6
paul_constantine CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: fraweg commentedComment #9
fraweg CreditAttribution: fraweg commented:-( No support in that issue ?
Comment #10
fraweg CreditAttribution: fraweg commentedComment #11
markusk CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: fraweg commentedok..now it woks?
Comment #17
markusk CreditAttribution: markusk commentedYes, like a charm.
Comment #18
Liam McDermott CreditAttribution: 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 CreditAttribution: Liam McDermott commentedMarking #1539590: Views field is_online reduces result to one row as a duplicate of this issue.
Comment #20
Liam McDermott CreditAttribution: Liam McDermott commentedComment #21
Liam McDermott CreditAttribution: Liam McDermott commentedAnd here's a patch!
Comment #22
Liam McDermott CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: fraweg commentedOk,
thanks for yor work!
Best regards
Frank
Comment #26
markusk CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: lucasgladding commentedComment #29
manicato CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 1
on any view - complex or simple
Comment #32
Liam McDermott CreditAttribution: 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 CreditAttribution: PlayfulWolf commentedno.
Comment #34
Liam McDermott CreditAttribution: Liam McDermott commentedAh, well sadly without that patch applied to Views the is_online filter won't work.
Comment #35
antoinetooley CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: 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.