Administration menu Toolbar style 7.x-3.0-rc3
drupal core 7.15 (was 7.14 with same issue)
devel modules disabled
cache disabled, cleared
2 sites sharing the same code base
one of the sites is multilingual
> Administration » Configuration » Administration and disabled "Cache menu in client-side browser" to prevent sort of client cache issue
tested firefox and chrome

Issue: both sites don't show the number of anonymous users
count of logged users is OK

Not sure if this is a bug or something related with my setup.
Any help or sugestion is welcome.
thanks

Comments

-Mania-’s picture

Same problem. :/ Anonymous users always at 0, logged in count working fine.

nfin01’s picture

We had the same problem, we un-check cache for anonymous user, it seems to solve it. See if this will work for you:

Goto: admin>>config>>development>>performance - under caching un-check the Cache pages for anonymous users.

-Mania-’s picture

I've got all the caching off as I'm working on localhost. I also read that some people had problems because they didn't have user '0' in the users table but I checked and it's there. Anything else to try?

darrell_ulm’s picture

Category: support » bug
Status: Active » Needs work

This issue still seems to be active.

#2 https://drupal.org/node/1733384#comment-6386372 is not going to work in a production environment.

Has there been any resolution to this? It's a nice option to have.

Update: actually this may be a duplicate of this issue: https://drupal.org/node/1911434, delegate it to the maintainers to decide.

Road Runner’s picture

I have had this issue forever i.e. no anonymous user count showing. FYI I use Boost and Domain Access too. It is difficult to determine if logged in works because we have so few but it does seem to show correctly.

Road Runner’s picture

Issue summary: View changes

update

Pomliane’s picture

Issue summary: View changes
Status: Needs work » Active
christiaan_’s picture

Had the same issue. What worked was to disable the administration menu module, uninstall the module, clear the caches, and re-install.

Road Runner’s picture

#7 didn't work also disabling cache menu in admin menu config didn't work. The online block reflects what is shown in the admin menu too which is always 0 or 1

ckvergleich’s picture

Same problem, need help or suggestions

alexandreracine’s picture

Version: 7.x-3.0-rc3 » 7.x-3.x-dev
Component: User interface » Code

This is also happening in dev, so let's put it there.

jay.lee.bio’s picture

Did you guys try downgrading to 7.x-3.0-rc1? I stopped upgrading since this version because for me it's the last version that shows the correct number of anonymous users. I won't even bother upgrading to 7.x-3.0-rc5 that just came out unless somebody can confirm that this issue has been taken care of.

SKAUGHT’s picture

sorry i don't currently have time to make patch..

function anon_users_total() {
	$interval = REQUEST_TIME - variable_get('user_block_seconds_online', 900);
	$query = db_select('sessions', 's')
		->fields('s', array('sid'))
		->condition('uid',' 0', '=')
		->condition('timestamp',$interval, '<=');
	$users = $query->execute();
	$list = array();
	while($record = $users->fetchAssoc()) {
		$list[] = $record;
	}
	return sizeof($list);
}
Road Runner’s picture

Who really cares now, seriously, 4 years after initial problem is called out you show back up and still don't care enough to fix the issue and who would want to mess around with a patch you won't even do yourself.