• Hi there.

    Thanks for a great plugin which has been very helpful to us.

    The problem started when I updated to Version 2.5.5. Since then the four posts we have published all say Total Views 1.

    But when I look at the Daily Popular Posts on the back end of the site, it says that, while the total views are 1, the daily visits are 3,674,789 for the top one, 494,672 for the second one, and so on – all incorrect sadly!

    All the settings look OK – was wondering how to fix?

    Thanks

    Chris

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Ajay

    (@ajay)

    Are all these new posts?

    I just checked your site and I get a 403 error for the ajax hits on the plugin. <strong>ERROR:</strong> That action is currently not allowed.<br /><br />

    Can you try changing the tracker type to Query variable and see if this starts working?

    Have the same problem. After upgrade the plugin, posts’s total views have became to 1. The problem, I’ve noticed, because PRIMARY KEY (postnumber,blog_id) was deleted after upgrade. And all visited posts since then duplicated every time. So you can see on admin or webpage only last record (which has 1 of course).

    Plugin Author Ajay

    (@ajay)

    It looks like the upgrade didn’t go through properly if you can’t see the PRIMARY KEYS in there.

    Can you run the alter table syntax in phpMyAdmin or equivalent to add this primary key?

    alter table wp_top_ten add primary key(postnumber, blog_id);
    

    Yep, I did but got the error Error updating record: Duplicate entry '30177-1' for key 'PRIMARY'
    So I’ve repaired table and data from backup. It’s OK.

    Plugin Author Ajay

    (@ajay)

    Thanks for confirming.

    @christitley, could you please see the above as well?

    I’m also experiencing the same problem on my website – fselite.net

    I’m not too familiar with writing SQL database entries. Could you go into a bit more detail on how I can fix this?

    Thanks for a great product

    Plugin Author Ajay

    (@ajay)

    Do you have access to phpMyAdmin ? If not you can use ARI Adminer to access your database.

    Once there, you can open your database.

    And run this query

    
    alter table wp_top_ten add primary key(postnumber, blog_id);
    alter table wp_top_ten_daily add primary key(postnumber, dp_date, blog_id);
    

    I’m working on a fix to add a new button that does the mySQL entries.

    Please make sure you backup before you do anything

    I have the same problem, I already executed the query in phpmyadmin but it gives the same error Error updating record: Duplicate entry ‘30177-1’ for key ‘PRIMARY’

    Plugin Author Ajay

    (@ajay)

    Please delete the primary keys first and then run the above query.

    the problem is that there are several identical records, so the PK is not being created, how do I delete all duplicate records?

    I’ve tried the suggestions above, but no luck. Run into the same issues.

    Not sure what I need to run to delete the primary key. Tried this:

    alter table wp_cfnwjj_top_ten drop primary key(postnumber, blog_id);
    alter table wp_cfnwjj_top_ten_daily drop primary key(postnumber, dp_date, blog_id);

    (wp_cfnwjj is my correct database name)

    I get the following errors:

    alter table wp_cfnwjj_top_ten drop primary key(postnumber, blog_id)
    Error in query (1064): Syntax error near ‘(postnumber, blog_id)’ at line 1

    alter table wp_cfnwjj_top_ten_daily drop primary key(postnumber, dp_date, blog_id)
    Error in query (1064): Syntax error near ‘(postnumber, dp_date, blog_id)’ at line 1

    Error in query: 1 2

    Thanks

    Plugin Author Ajay

    (@ajay)

    @calooom,

    alter table wp_cfnwjj_top_ten drop primary key
    alter table wp_cfnwjj_top_ten_daily drop primary key
    

    This should work.

    @oomaikoo
    Can you please try deleting and readding the primary key manually?

    @ajay

    Sorry – still didn’t work ?? https://puu.sh/zfYC3/702e76d2e2.png

    Ran the code and tried the original code to run, but get the same error:

    https://puu.sh/zfYDJ/ab65105fb0.png

    Plugin Author Ajay

    (@ajay)

    The screenshots help.

    What is the name of your table? wp_ is the default prefix but you might have a different one. You need to open up the database that holds your website and change the prefix.

    Also, please add a semicolon ; at the end of each line.

    Plugin Author Ajay

    (@ajay)

    v2.5.6 has a new button under Tools that lets you add/recreate the primary key

    • This reply was modified 7 years ago by Ajay.
Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘After update all posts show Total Views 1’ is closed to new replies.