Getting SQLSTATE[42S22]: Column not found: 1054 Unknown column 'IF1319394268MAXsessions.timestamp900101' in 'having clause' when activating/editing the view 'user_stats_online_users_pictures'. I then try to enable the block anyway, but it doesn't show up on the site. Everything else on my D7 install is working without problems.

Thanks for a great module BTW! Very important to our site. Looking forward to the next dev/alpha/beta/rc of User Stats for D7.

Comments

thomas1977’s picture

Seems to be some kind of problem with a unix timestamp contained in a database table... Not even sure this has got something to do with User Stats...? (even though the view 'user_stats_online_users_pictures', I believe, was created upon User Stats module installation...

thomas1977’s picture

Ok, it seems User Stats is to blame on this, since the field 'User: Is online' is provided by User Stats (and not by Views/core).

thomas1977’s picture

Still having this issue. Does anyone happen have any idea what might be the solution here?

RodrigoNP’s picture

Status: Active » Needs review

at line 31 of views/views_handler_filter_is_online.inc , replace:

$this->query->add_having($this->options['group'], $sql);

with:

$this->query->add_having_expression($this->options['group'], $sql);

jenna1’s picture

thanks, RodrigoNP, worked perfect with Views and is online field.
I have two days searching for the error and have just found your patch, great, many thanks, Jenna.

thomas1977’s picture

Is this basically a Views or a User stats problem? If user stats problem: are we going to see an update to the module?

fraweg’s picture

Hello,

I have also MYSQL-problems with the onlinestatus in views. The fix from "#4" help me. Thanks @ RodrigoNP . I hope this fix goes into the dev-version. I dont want to fix it anytime when I upgrade the version.

Thanks for your work in this Module
Frank

PS. My System: Linux 11.04,Drupal 7.12

NathanM’s picture

Thanks for the fix here. Also hope this gets committed to the dev version.