All Good Things Must Come To An End

As you all know, I have been doing WordPress plugins and supporting it for the past 6 years. These 6 years of my life, I have been through my polytechnic education, my national service as well as my university education.

I just graduated from university in December 2009 and have been looking for full-time jobs. I am offered a full-time job and will be starting work on 1st February 2010.

I regret to say that I am NOT ABLE to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

However, I WILL still update my plugins whenever I can and you still can report bugs to me via email and I will try to fix it.


Author Topic: PostViews buggy in 2.9  (Read 1052 times)

0 Members and 1 Guest are viewing this topic.

Offline Lincoln

  • Newbie
  • *
  • Posts: 14
    • View Profile
PostViews buggy in 2.9
« on: 30 December 2009, 07:26 »
Since upgrading to WP 2.9, I noticed the PostViews now only count views from users who are logged into WordPress, such as me.  Any guest or unlogged visitor who visits the page does not yield a postview count.

Offline navjotjsingh

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: PostViews buggy in 2.9
« Reply #1 on: 30 December 2009, 10:37 »
Working perfectly here on 2.9. Pls try deactivating other plugins one by one to find the conflict if at all is occuring. I tried with both options - Everyone and Guests only.

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: PostViews buggy in 2.9
« Reply #2 on: 30 December 2009, 16:56 »
It works perfect on two of my installation as well.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Lincoln

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: PostViews buggy in 2.9
« Reply #3 on: 30 December 2009, 20:07 »
I have since troubleshooted the plugins and determined that the problem is a plugin conflict with Ajax Edit Comments.  For some reason when AEC is running it prevents PostViews from properly incrementing.  Not sure if there's a way to workaround this issue, but I've also reported it to the developer of AEC as well.

Offline starman417

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: Custom
Re: PostViews buggy in 2.9
« Reply #4 on: 31 December 2009, 20:21 »
I can confirm its a conflict with Ajax Edit Comments.  Postviews wasn't working for me either until I turned off that plugin.

Offline Lincoln

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: PostViews buggy in 2.9
« Reply #5 on: 31 December 2009, 20:50 »
There's a workaround (provided by the AEC developer) that will fix the issue:

Add this code in the wp-postviews.php on line 62:

if (is_int($post)) {
      $post = get_post($post);
   }

That fixed the problem for me.   ;D

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: PostViews buggy in 2.9
« Reply #6 on: 01 January 2010, 06:51 »
What is weird, why wp_is_post_revision() will break the plugin, I want to make sure that the post is not a revision first before counting the views. That piece code was added to fix a bug with revision. Anyway I can follow up on this with AEC developer? Like a email that you can forward me or a forum post?

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline Lincoln

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: PostViews buggy in 2.9
« Reply #7 on: 01 January 2010, 17:03 »
It was working fine until WordPress 2.9 though.  They must have changed something in the code, maybe the way revisions are executed that caused the plugin conflicts.  If you want to contact the developer, he can be reached via his contact form:  http://www.ajaxeditcomments.com/contact/


Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: PostViews buggy in 2.9
« Reply #8 on: 01 January 2010, 20:38 »
Thanks, I have contacted him.

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline JeffC

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: PostViews buggy in 2.9
« Reply #9 on: 07 January 2010, 00:04 »
Just wanted to chime in and say that today, I noticed all of my recent posts were showing 0 views and upon looking through this thread, I disabled Ajax Edit Comments and noticed the views incrementing normally so there is definitely a conflict of sorts between the two. Do I have to leave AEC disabled until an update to WP-PostViews is released?

Offline GaMerZ

  • lesterchan.net
  • Administrator
  • *****
  • Posts: 11,536
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: lesterchan.net v3.4
Re: PostViews buggy in 2.9
« Reply #10 on: 07 January 2010, 04:15 »
Hey Jeff, the fix is in reply 5.

Open up wp-postviews.php

Before line 62:
Add:
Code: [Select]
if (is_int($post)) {
$post = get_post($post);
}

I have contacted the author and waiting for reply, I just add in the fix on my end. http://plugins.trac.wordpress.org/changeset/190781

++ lesterchan.net - Lester Chan's Website

I regret to say that I am not able to provide support for my plugins anymore due to my full-time job commitment. I will leave this forum open and let the community help one another.

Offline miccom

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: PostViews buggy in 2.9
« Reply #11 on: 14 January 2010, 13:53 »
Thanks! Now counting works again.

Offline kaspar

  • Newbie
  • *
  • Posts: 1
    • View Profile
  • WordPress Version: WordPress 2.9.x
  • Theme Name: myown
Re: PostViews buggy in 2.9
« Reply #12 on: 15 March 2010, 00:27 »
Hi,

it doesn't work for me after I have upgraded my website to WP 2.9.2 :-(
I've added a code in the wp-postviews.php on line 62 but the plugin doesn't still count the views. (No, I don't use Ajax Editor Comments plugin).

Thank you,
Mirek