WordPress.org

Ready to get started?Download WordPress

Forums

Top 10 - Popular posts plugin for WordPress
[resolved] Strange problem... (18 posts)

  1. nocotytato
    Member
    Posted 1 year ago #

    I have two WP sites. The first - almost 300.000 views for 2 years. The other established few days ago.
    On the first one since last update of Top 10 i've a funny ploblem. It didn't counted the total views properly. When I checked the database I saw, it added one record for every page view (in both tables - daily and total). So, if one page was viewed 100 times on one day, i had 100 records in each database. And, displaying the views, it gave always 1 total view (it was total 1 view, 57 of that last day). Finaly i modified a bit the sql queries in php files for display and it started display proper values (at least in front-end).
    When I installed the new site I installed Top 10 as well. And here it works absolutely different way. I have just one record for every post in the total views table and one record pay day for a post in daily table.
    Can anybody explain this difference? I don't understand...

    By the way, it's a very nice plugin and makes some good job for every site, I believe.

    http://wordpress.org/extend/plugins/top-10/

  2. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    nocotytato, that sounds strange indeed. the way the plugin works is that it is one record per day in the tptn total table and the one record per hit in the daily table.

  3. nocotytato
    Member
    Posted 1 year ago #

    In my new site it's one record per post in the total table and one record per post per day in the daily table... In which table should it be one record per hit?

  4. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    wp_top_ten should have the one record per post
    wp_top_ten_daily should have one record per combination of post+date.

  5. nocotytato
    Member
    Posted 1 year ago #

    SO it's OK on the small site. On the bigger one something went wrong. What would you advice me? Should I reinstall top10? Is there something, I should check?

  6. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    By Big site you mean your original site?

    It could be that the upgrade failed. Can you tell me what columns do you have in the 2 tables of the site?

  7. nocotytato
    Member
    Posted 1 year ago #

    Sure ;-)
    postnumber,cntaccess,dp_date in wp_top_ten_daily
    postnumber,cntaccess in wp_top_ten
    exactly the same as on the other site...

  8. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    So, the upgrade was fine. Ok, can I take a look at your sites so that I can try debugging what I can by loading pages / counts.

  9. nocotytato
    Member
    Posted 1 year ago #

    Sure,
    The bigger one is http://nocotytato.org.pl
    The smaller one is http://mateusz24.eu

    How can I help with debugging? What do you need from my side?

  10. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    I am looking at:

    http://nocotytato.org.pl/opieka-nad-dziecmi/wladza-kontakt-czy-dziecko/

    and see:

    82 ogółem, z czego 35 w ciągu ostatnich 7 dni

    which increases when I refresh.

    I don't see the displayed count on:

    http://mateusz24.eu/o-ludziach/przez-pol-drwiaco-przez-pol-serio-bawi-sie-pan-galanteria/2012/11/12/

  11. nocotytato
    Member
    Posted 1 year ago #

    Yes, that's right. However, it works like you see becouse I made some midifications to the php files. On the one displaying TopTen counters it used to work that way, that the daily (which is 7 days curently) counter increased and the total counter not. First I used to enter few times a day into the MySql interface and run a query, which summed entries in the tabels to make it like it should be:

    wp_top_ten should have the one record per post
    wp_top_ten_daily should have one record per combination of post+date.

    After i modified the sql queries in php files, is started to sum betwen the database and display, so it's fine. Almost. n the backend I still see the total display not summed. So i need to run the query manually sometimes to have proper data. Otherwise I would have alwas something like Total / Today's Views - 1/35. And the second would grow after each view, but the total would be still 1.

    In other words... the problem is with the counter, which I didn't touch. I did touch the display mechanism, which was easier for me to understand. Do you think, I should try to remove Top Ten (after backing up data) and install it once again? Could it help somehow?

  12. nocotytato
    Member
    Posted 1 year ago #

    Post Scriptum.
    The other site (the smaller) is quite new and there's no reason to show views (as almost nobody visits it). I'll let Top Ten display stats, when I'll get some more readers. But I can make some observations on how the plugin works, as it's collecting data all the tmie ;-)

  13. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Can you backing up the db, doing the uninstall and delete from within WP and reinstall.

  14. nocotytato
    Member
    Posted 1 year ago #

    Just the two tables? Sure I'll do this evening and let you know ;-)

  15. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    You'll need to do the Delete Plugin from within WP Dashboard for a clean uninstall.

    I suggest backing up the whole DB

  16. nocotytato
    Member
    Posted 1 year ago #

    Incredibile... ;-)
    I backed up tables (I do a full backup of DB every day, so I did not special now) removed plugin (deleting files), installed plugin again, imported data to tables, saved settings of plugin (they were still there from some cache I think. And... Now it looks like it worked fine. We'll see, what will happen with other plugins ;-) But for the moment it's like a miracle...

  17. Ajay
    Member
    Plugin Author

    Posted 1 year ago #

    Sounds good.

    Monitor for a few days and let me know

  18. nocotytato
    Member
    Posted 1 year ago #

    Sure. For the moment it's still working fine ;-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.