WordPress.org

Ready to get started?Download WordPress

Forums

WP-PostViews
Some posts and pages do not count (4 posts)

  1. pavelevap
    Member
    Posted 9 months ago #

    Hi,

    I noticed that stats values bellow some pages/posts remain at small numbers (for example "1", "5", etc.). I searched for the cause and I found that these items have duplicated "views" meta_key. Several items had 5 or 7 meta_keys "views". And when any item had more than one meta_key "views", then function the_views() showed only "1" views (on frontend and also in administration) even if the value for duplicated meta_key was right, for example 3456.

    Any idea, why meta_key is duplicated sometimes?

    Thank you for your help!

    http://wordpress.org/plugins/wp-postviews/

  2. Lester Chan
    Member
    Plugin Author

    Posted 9 months ago #

    Actually, I have no idea why some meta_key will be duplicated, by right it shouldn't because in the code I am already passing in unique to true to WP. I know some rare users encounter this, but on my 3 installation of WP and my development, so far I have not encountered it yet.

  3. pavelevap
    Member
    Posted 9 months ago #

    Thank you for your answer!

    Yes, I went through plugin code and I did not found any related issues. I thought using add_post_meta() for publish_post action can make problems, but there is also true parameter, so new meta should not be created. I thought somebody publish post, then mark it as draft and then publish it once again...

    Do you have some details about other affected users? Maybe we have similar environment or something else...

    I am using W3 Total Cache, maybe somehow related?

  4. Lester Chan
    Member
    Plugin Author

    Posted 9 months ago #

    " I thought somebody publish post, then mark it as draft and then publish it once again" - I don't think so because if you publish it again the add_post_meta() will fail.

    On 1 of my site, I am using W3 Total Cache, but I add post meta to the ignored query stem.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.