Recent Topics

1 Jan 03, 2011 00:16    

My b2evolution Version:

Since I upgraded to 4.0.3 a few days ago the view count on my posts doesn't seem to be updating. According to AWStats a post I made last night has had 72 views, which is about what I'd expect over 24 hours, but according to b2evo it's had 2. Is there some change to the way this works in 4.0.3?

Rob

2 Jan 03, 2011 03:31

Can you give a link to the post? This looks like a bug.

4 Jan 10, 2011 18:01

After updating a week ago, I realized today that view counts do not update.
Is there a solution yet?

Thanks!
Gerard

5 Jan 11, 2011 06:10

Make sure you are not using an old _item_content.inc.php file from previous version of b2evolution or shipped with the skin.

Can anybody with this problem give me FTP access to the blog?

6 Jan 11, 2011 15:20

My skin does not have its own _item_content.inc.php, it's using the default one.

Rob

7 Jan 11, 2011 16:25

Ditto. My _item_content.inc.php is up to date and my skin (Simple Zen) uses the default

8 Jan 11, 2011 23:59

What about FTP access, can I login and check what's going wrong?

9 Jan 12, 2011 03:19

Sure. Give me an email address to send the log-in data.
Are U using Dreamweaver or another program? (Just so I know what to send you)

10 Jan 12, 2011 04:39

Can you PM it to me?
All I need is hostname to connect to, username and password

ps I removed your email

12 Jan 12, 2011 21:14

Yes, I got your message. I'll check the server later today.

13 Jan 14, 2011 05:36

Good. Hope you find something.

G. >>de nederlandse mafia...

14 Jan 14, 2011 07:10

Thanks to GerardP I found a problem in b2evo. I'll try to fix it in next few days.

In two words, b2evo doesn't count views because it marks them as page refresh.

Hit::is_new_view() is false

15 Jan 14, 2011 09:05

We all love problems, however, we love even more to fix them. THX SAM for figuring this one out.
Awaiting any suggestions you may have.

THX.,
GP

17 May 20, 2011 03:58

GerardP wrote:

Anything yet????

I'm on 4.0.5, and I'm having the same problem, so if it was fixed in 4.0.3, it didn't carry over. It's been a few months since anyone posted in here, so I'm hoping that a fix is out there somewhere.

Stace

18 May 20, 2011 06:10

AFAIK it's not fixed yet.

19 Jun 27, 2011 02:32

Is there any progress yet? I got the same issue over here with v 4.0.5.

20 Jul 04, 2011 21:17

sam2kb wrote:

AFAIK it's not fixed yet.

If it's not fixed in the main version, is there at least a quick fix we can do on our own? It seems like it would jut be a matter of replacing a variable in the skin file with the variable that shows browser hits on the admin stats page.

Stace

21 Jul 05, 2011 05:04

It should be fixed in the upcoming release.
I personally don't know of any working patch fo this issue.

22 Aug 20, 2011 02:32

Same issue here and I am using the latest version... "No views"

23 Aug 20, 2011 06:49

It looks like this is fixed in v4.1, there's also a new feature added to count user sessions, which is actually more precise.

24 Aug 20, 2011 08:31

sam2kb wrote:

It looks like this is fixed in v4.1, there's also a new feature added to count user sessions, which is actually more precise.

That's great news! Any idea when 4.1 is coming out?

26 Oct 05, 2011 19:48

sam2kb wrote:

It looks like this is fixed in v4.1, there's also a new feature added to count user sessions, which is actually more precise.

Well, 4.1.1 is out, and I've upgraded to it, but my views are still showing up as 0. I suspect that my custom skin (based on Purple Beauty) is not smart enough to know what changes need to be made to use the fixed count or the user session count. Sam2kb, can you (or anyone) point me to where I can find information about what to change in my skin?

Thanks,
Stace

27 Oct 05, 2011 21:22

I didn't find anything in default Purple Beauty skin that can disable view counter. Did you add any custom *.php files to the skin?

Try this, edit the following in index.main.php

global $shutdown_count_item_views;

while( $Item = & mainlist_get_item() )
{	// For each blog post, do everything below up to the closing curly brace "}"
	// Increment view count on ALL posts
	$shutdown_count_item_views[] = $Item->ID;

28 Oct 06, 2011 17:40

sam2kb wrote:

I didn't find anything in default Purple Beauty skin that can disable view counter. Did you add any custom *.php files to the skin?

No, I didn't add any custom *.php files, but I did modify many of them.

sam2kb wrote:

Try this, edit the following in index.main.php

global $shutdown_count_item_views;

while( $Item = & mainlist_get_item() )
{	// For each blog post, do everything below up to the closing curly brace "}"
	// Increment view count on ALL posts
	$shutdown_count_item_views[] = $Item->ID;

I tried that, but it didn't make any difference.

Here's the section of code from my skin's index.main.php file that actually displays the number of views:

			<div class="bSmallPrint">
				<?php

					$Item->issue_time( array(
						'before'    => ' ',
						'after'     => '',
						'date_format' => 'M d Y',
					));

					echo ', ';

					$Item->wordcount();
					echo ' '.T_('words');
					echo ', ';
					$Item->views();
					
				?>


I can see that the variable it's trying to display is just "views()". Is that the correct variable to display in 4.1.1?

As always, thanks for your help.

Stace

29 Oct 06, 2011 20:41

I believe it's correct. You can also find post views in backoffice when viewing full posts.

Can you PM me FTP access to your server so I can check where the script breaks?

30 Oct 06, 2011 21:03

sam2kb wrote:

Can you PM me FTP access to your server so I can check where the script breaks?

Unfortunately, I can't. It's behind a municipal government firewall. :(

I did notice this, though. I browsed the skins on the demo server and found one that works correctly with 4.1.1 running on that server: andreas_01.

I downloaded and installed andreas_01 on my production server, and I'm now getting "1 view" on the top post of the main page. I switched back to my skin, and I'm still seeing "1 view" on the top post. I switched to a different machine to force a new session and it incremented to 2 views, other posts I looked at are still showing "No views". I guess it's sort of working after the code change you suggested above. I'll keep an eye on it and report back.

Thanks,
Stace

31 Oct 06, 2011 21:07

You can easily check counters by pointing several browsers to your blog
http://browsershots.org/

Also note that if you open a category only the first post (the top one) increases its counter, so for test purposes you should point browsers to a single post

32 Oct 06, 2011 21:13

sam2kb wrote:

You can easily check counters by pointing several browsers to your blog
http://browsershots.org/

That's handy! I'll remember that for later. Unfortunately, since this server is not publicly accessible yet, it won't do me a lot of good. I can have a bunch of different users go to specific posts, though, and watch to see if the individual post numbers increment.

Thanks again. I'll let you know what I find out.

Stace

33 Nov 23, 2011 08:06

Post your views and ideas in this section only..


Form is loading...