Node access counter does not work with Boost. When Boost is switched off node counter works again.

Comments

eTech’s picture

Component: Installation » Miscellaneous
mikeytown2’s picture

Category: bug » support
mikeytown2’s picture

close this issue if this solved your problem, otherwise please give me more info.

joel_guesclin’s picture

I'm sorry but I don't understand this... I would like to get the "read counter" to work also. I am playing around on a test site. I have successfully installed Boost, and some pages are indeed cached.
Then I have turned on the statistics and read an article (ie a story) a few times using the admin user in order to bump up the page counter.
Then I got a bit confused and put the "Stats Block" in place but it did not show anything.
Then I switched off Stats Block and switched on "Popular Content", then configured it to show top 5 of everything. Then I switched it off, and switched on the Stats Block - but the Stats block does not show anything.
Is it in fact possible to increment the Read counter when Anonymous users read a cached page?

mikeytown2’s picture

Is it in fact possible to increment the Read counter when Anonymous users read a cached page?

Yes, it's possible. Place the "Boost: AJAX core statistics" block in a region; if it's still "disabled" then it won't work. Next go to admin/build/block/configure/boost/stats and make sure "Display Statistics" is checked. Save.

To test, flush the boost cache. Then go to node and view it a lot with another browser (should be cached by now), you should see the counter increase.

joel_guesclin’s picture

Thanks, I've managed to get that working. I don't quite understand what the "Cache statistics" check box for the block does though. If I check this, does it mean that the block of "Most popular content" gets cached with the page, and if so when does it get updated?

mikeytown2’s picture

Output gets cached, gets updated on cron runs. If your running over a million nodes, running stats on that can take several minutes. Close this issue if you don't have any more questions.

joel_guesclin’s picture

Status: Active » Closed (fixed)

Thanks for the help - I've opened a different support call on general understanding issues

doublejosh’s picture

I just can't seem to get this block working :( I've been a Boost lover for some time.

Added the block to my admin region, enables show stats, refreshed the boost cache, visited the page a bunch, ran cron.

Perhaps I'm misunderstanding...
Does the block need to be placed on the page for anonymous users in order to count them?
And then this makes the normal counting works?

Or does this block display stats info?

Thanks.

mikeytown2’s picture

Status: Closed (fixed) » Active

Block will do the counting as well as the display of the site-wide stats.

Configure this
admin/build/block/configure/statistics/0
Show block for specific roles: authenticated user

Go to admin/build/block/configure/boost/stats
Display Statistics: Checked
Show block for specific roles: anonymous user

Enable both blocks on admin/build/block/list; make sure the region is not disabled & you will want both to be next to each other in the same region.

szy’s picture

Is there any useful way to enable statistics with Boost?

Useful, because this:

If false, uses Javascript to hide the block via "parent().parent().hide()"."

... can't be called 'useful'. JS makes it working only for JS-enabled
browsers - what about other browsers, what about search bots?

Even if I set stats blocks to 'disabled', I get garbage in code:

<div class="region region-stats"> 
  <div id="block-boost-stats" class="block block-boost region-odd odd region-count-1 count-1"> 
  
  <div class="content"> 
    <div id="boost-stats"></div>  </div> 

Why stats cannot be launched quiet, 'in background', please?

Szy.

mikeytown2’s picture

@szy
Set the block title to <none>

szy’s picture

There is title set to none, I promise :]

Szy.

PS. Brilliant module, thank you!

jcisio’s picture

Status: Active » Fixed

Marking as fixed to avoid confusion ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

adanelova’s picture

hi, I followed #4 and #5, but I cannot see the counter of node views. I can see the statistics - the last visited pages and so on, but not the counter. What could I do wrong?
Is it possible to count also anonymous visits while enabling this block only for administrator? I need to see the counter of total views of node, but I cannot let it see the anonymous visitor.

Thanks for module, it really made website much faster!

Rosamunda’s picture

Status: Closed (fixed) » Active

Hi there,
I´ve read the instructions of that block (and the comments above), and still, I didn´t understand it. It´s not n00b proof I guess :)

Stats Block
Drupal's core stats is supported. Configure the "Popular content" block, but then disable it. Place the "Boost: AJAX core statistics" in its place. If ajax stats are loading too slowly, copy stats/boost_stats.php to your webroot and enable "Cache Statistics Block". The cache gets updated on cron runs. This only shows up on pages that get cached and can be used to collect data and not display it.

I don´t want any new block to appear, jut the normal statistics that appears at the links sections of each node, showing the overall reads count. I´m not using the "Popular content" block in any way either.
BTW, when it says copy stats/boost_stats.php to your webroot, should I add that file besides the .htaccess file, right?

I´m sorry I´m sure the instructions are very clear, but I´m a little newbie with the module and as I´ve already installed it in my production site, I want to carefully understand every single step before proceeding.

Thanks for any help and clarification!! :)
Rosamunda

erikwegner’s picture

Subscribing.

Rosamunda’s picture

Anyone?

bgm’s picture

Status: Active » Fixed

I know it's been a while with no answer, but in case anyone else is searching:

* it's in a Block because it's the way the ajax request is included (and shown only for anonymous users). It requires the "statistics" core module to be enabled for it to work.

* you can copy the boost_stats.php in the same directory as the .htaccess, yes. This avoids bootstrapping all Drupal just to write the stats.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.