WordPress.org

Ready to get started?Download WordPress

Forums

[wordpress popular posts] No data so far. (37 posts)

  1. Kilrathy
    Member
    Posted 3 years ago #

    Hi

    Got some problems with this plugin. No data will be populated to the database.

    my blog: http://www.kilrathy.net

    Maybe there is a problem, becauce my WordPress is running under http://www.kilrathy.net/wordpress but I redirect it with an index.php from http://www.kilrathy.net.

  2. Héctor Cabrera
    Member
    Posted 3 years ago #

    Hi Kilrathy,

    Please open wordpress-popular-posts.php using a code editor such as Windows' Notepad or Adobe Dreamweaver, find this code:

    <!-- WordPress Popular Posts v<?php echo $this->version; ?> -->
    <script type="text/javascript" charset="utf-8">
        /* <![CDATA[ */
        //jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
    	jQuery.post('<?php echo bloginfo( 'url' ); ?>/wp-admin/admin-ajax.php', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
        /* ]]> */
    </script>
    <!-- End WordPress Popular Posts v<?php echo $this->version; ?> -->

    ... and change it to:

    <!-- WordPress Popular Posts v<?php echo $this->version; ?> -->
    <script type="text/javascript" charset="utf-8">
        /* <![CDATA[ */
        //jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
    	jQuery.post('<?php echo bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
        /* ]]> */
    </script>
    <!-- End WordPress Popular Posts v<?php echo $this->version; ?> -->

    Let me know if that fixes your problem, ok?

  3. jmorrow
    Member
    Posted 3 years ago #

    I have the same problem as Kilrathy at my site: Supplement Updates

    I tried editing that file and it didn't resolve the no data issue.

  4. Héctor Cabrera
    Member
    Posted 3 years ago #

    Hey Jarred,

    Just checked your site and I'm seeing two popular posts being listed on your footer area. Am I missing something?

  5. Kilrathy
    Member
    Posted 3 years ago #

    Hi Ikki

    Thanks a lot - now it works! :)

    Cheers,
    Kilrathy

  6. pixelmad
    Member
    Posted 3 years ago #

    Hi Ikki, unfortunately I seem to be having the same problem and have tried the above fix.

    Any idea's?

    Thanks in advance.

    Cheers
    John

  7. techstar
    Member
    Posted 3 years ago #

    I am also having the same issue, have tried the above change but no results. Still showing no data.

  8. Héctor Cabrera
    Member
    Posted 3 years ago #

    Guys, have you read the FAQ yet? Have you checked all possible fixes described there already?

  9. techstar
    Member
    Posted 3 years ago #

    Yes. I have wp_header() tag in <head>

    Regardless of "giving it some time" this shouldn't be the case if you are only displaying top comments and not visits. It should show the top 5 articles with the most comments as the data is already there.

  10. Héctor Cabrera
    Member
    Posted 3 years ago #

    Alright. Let me explain how my plugin works a bit better.

    WordPress Popular Posts works based on views, mainly. Whenever a post gets a view, WPP will register it on its cache table. Only those posts registered by my plugin will be listed. It doesn't really make much difference if a post has got a lot of comments or not if it hasn't been cached by my plugin - it still needs to be viewed by someone/people in order to rank as popular.

    If you set Sort by to comments, what WPP does is check all those posts in its cache and then sorts these entries by comment count. That's why you need to "give it some time" - you have to let WordPress Popular Posts have them cached first.

  11. techstar
    Member
    Posted 3 years ago #

    So really you cant use this if you are building a new site and want to test designs unless you send a bunch of users there? Any way to import some fake cache data straight to the DB through phpmyadmin or something?

    Thanks for the explanation, and its great to see you supporting this plugin.

  12. pixelmad
    Member
    Posted 3 years ago #

    Thanks for the prompt response Ikki, I have reread the FAQ and below is my response.

    I'm getting "Sorry. No data so far". What's up with that? There are a number of reasons that might explain why you are seeing this message:

    1. WordPress Popular Posts won't count views generated by logged in users (if your blog requires readers to be logged in to access its contents, this tutorial is for you) - Not an Issue

    2. your current theme does not have the wp_header() tag in its <head> section, required by my plugin to keep track of what your visitors are viewing on your site; It does

    no one has seen your posts/pages since WordPress Popular Posts activation, you should give it some time. It's been installed for 2 weeks and WP-PostViews is tracking 100's of views

    I know I am simply missing something along the way somewhere.

  13. Héctor Cabrera
    Member
    Posted 3 years ago #

    @techstar: I suppose you could do that. All you need to know are the IDs of the posts you want to "rank" and populate WPP tables. I'll come back with an example later if you need one. Also thanks for your words, I do monitor people's reactions towards my plugin and do my best to improve it update after update.

    @pixelmad: Mmm that's odd. In your case, I'd need to see your site to find out more. Kinda hard to tell what's wrong without taking a closer look to the pacient ;) What's your site URL?

  14. techstar
    Member
    Posted 3 years ago #

    @Ikki24: that fixed it for me. I went into phpmyadmin, to the table wp_popularpostsdatacache and inserted fake data for posts. Anyone who wishes to do this will need to get the post IDs for a few posts, you can go to your admin Posts link in WP-Admin, mouseover the title and it will show you the post id in your status bar. Then you just insert the data like in this screenshot. Do so at your own risk.

    After doing this however I realized this is not even the plugin I need. I thought "Sort posts by: Comments" would rank the most popular posts be the most commented. Doh! That's not the case.

  15. Héctor Cabrera
    Member
    Posted 3 years ago #

    @techstar, if you don't need that much fancy stuff maybe this might be what you're looking for: http://www.wprecipes.com/wordpress-hack-get-popular-posts-by-comments-count. Should do what you need for the moment :)

  16. pixelmad
    Member
    Posted 3 years ago #

    Aha yes that would be a great idea :-)

    http://www.johndunnephotography.com/

  17. Héctor Cabrera
    Member
    Posted 3 years ago #

    @pixelmad, just checked your site and I'm seeing some slight differences in WPP's javascript code. Have you modified it?

    Also, could you please check on your host's phpmyadmin and see if there is any data on the wp_popularpostsdata and wp_popularpostsdatacache tables?

    You've installed WordPress on a different location, right?

  18. pixelmad
    Member
    Posted 3 years ago #

    Hi Ikkie,

    Regarding ths js modification - no I haven't, at least not knowingly :) I checked PHPAdmin and both tables show zero records.

    Just in case I have deleted the plugin, re-downloaded it and am waiting to see if anything changes but nothing so far.

  19. Héctor Cabrera
    Member
    Posted 3 years ago #

    Try changing this:

    <!-- WordPress Popular Posts v<?php echo $this->version; ?> -->
    <script type="text/javascript" charset="utf-8">
        /* <![CDATA[ */
    	//jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
    	jQuery.post('<?php echo bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
        /* ]]> */
    </script>
    <!-- End WordPress Popular Posts v<?php echo $this->version; ?> -->

    ... into this:

    <!-- WordPress Popular Posts v<?php echo $this->version; ?> -->
    <script type="text/javascript" charset="utf-8">
        /* <![CDATA[ */
    	jQuery.post('<?php echo admin_url('admin-ajax.php'); ?>', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
    	//jQuery.post('<?php echo bloginfo( 'wpurl' ); ?>/wp-admin/admin-ajax.php', {action: 'wpp_update', token: '<?php echo $nonce; ?>', id: <?php echo $id; ?>});
        /* ]]> */
    </script>
    <!-- End WordPress Popular Posts v<?php echo $this->version; ?> -->

    Please let me know the results.

  20. pixelmad
    Member
    Posted 3 years ago #

    Still no luck I'm afraid :-(

  21. Truth
    Member
    Posted 3 years ago #

    I've noticed this problem with my installation too. It started displaying the "Sorry. No data so far.". Been using this plugin for a long time so I don't see why it stopped working suddenly.

    According to the dashboard page, there are data for monthly and all-time views but the daily and weekly ones have no data as of today. It was still working yesterday.

    Tried the fix posted above but it doesn't work. :(

  22. Héctor Cabrera
    Member
    Posted 3 years ago #

    Hi Truth,

    Mind sharing a screenshot of your WPP current settings? Also, what's your site URL?

  23. Héctor Cabrera
    Member
    Posted 3 years ago #

    By the way, just installed a fresh copy of WordPress 3.0 on my personal domain (which is on a shared host) and installed WordPress Popular Posts 2.1.0 on it. Everything works as expected :S

    Can you guys please deactivate all your others plugins and see if it works?

    UPDATE: scratch that. I just moved WordPress to its own directory and tried again - WPP didn't work. Something is preventing my plugin from communicating with WordPress core hence it can't update views to the database. This problem doesn't seem to be affecting sites that have WordPress installed on the root directory, though.

    WordPress Popular Posts 2.1.0 didn't include an update on its way to communicate to the database, so I suspect this might be a WordPress thing. Will keep on investigating.

  24. Héctor Cabrera
    Member
    Posted 3 years ago #

    UPDATE 2:

    Alright guys, found a possible workaround. It isn't as fancy as I would like it to be but it appears to solve the issue with blogs that have WordPress installed somewhere else. If you're on a hurry, feel free to skip the whole explanation and go see the summary :P

    This is what I did: I installed WordPress on a subdomain called blog (eg. blog.mysite.com) and then set up WordPress to run on the root domain (eg. mysite.com) by following this tutorial (which I believe most of you did).

    Note that on the tutorial they say that you should set your WordPress address (URL) field to something like mysite.com/blog. Here comes the tricky part: if you set it up as blog.mysite.com (subdomain form, as I did initially) it won't work since blog.mysite.com is outside your site and for security purposes all web browsers won't execute cross-domain ajax requests.

    That explains why my plugin couldn't update to the database all views generated by users. However, if you set WordPress address (URL) to mysite.com/blog (as the tutorial suggests) you won't have any problems and posts will be cacheable again.

    Summary: check on Settings > General that your WordPress address (URL) field is set to something like mysite.com/blog (or wherever you have installed WordPress) instead of blog.mysite.com. Otherwise, my plugin won't work.

    I've also done some minor updates to my plugin and would like you guys to test it out for me and maybe give me some feedback (bugs, weird behaviors, etc.). Please donwload it here.

  25. drkknght
    Member
    Posted 3 years ago #

    Hi Ikki,

    OK, so I noticed the "Sorry. No data so far." error about an hour ago. No idea if it has been appearing that way for just today or a few days. Outside of this, I've had the plugin running for about 8 months, or more - and have been loving it!

    I meet all the criteria in the FAQ. I've not yet upgraded to WP 3.0 - still on 2.9.2. As said, the plugin has been working for months (and I know as recently as last week) and I've made no major change to anything WP in the past month or so.

    I tried downloading the link you posted above in "update 2", but no dice.

    My site is ToonBarn.com, and the plugin widget would appear just below the 300x250 box ad in the right column of ever page.

    Also, to note... an odd number three appears after the title of that section. the title in the widget settings is "Hot Topics at the Barn" and it appears as "Hot Topics at the Barn3". ...maybe that's a clue...?

    Best,
    Rob

  26. Truth
    Member
    Posted 3 years ago #

    Under the WP URL, I've the correct settings, it's "http://amourchaleur.com/wordpress". My actual blog is located at http://amourchaleur.com but the issue still exist. My current setting is:

    <?php if (function_exists("get_mostpopular")) get_mostpopular("range=weekly&order_by=views&limit=3&stats_comments=0&stats_views=0&wpp_start='<ul>'&wpp_end='</ul>'&post_start='<li>'&post_end='</li>'&pages=0"); ?>

    I'll try out the new version tonight and let you know. Thanks!

  27. Héctor Cabrera
    Member
    Posted 3 years ago #

    @drkknght: just checked your site and it seems to me you´re still running the official 2.1.0 and not the beta version I posted. Can you please check again?

    @Truth: please do let me know the results, ok?

  28. Truth
    Member
    Posted 3 years ago #

    Tried the new version yesterday but still didn't fix the problem. I reverted back to the old version.

    Is it possible to remove the "weekly, monthly" text from the output inn the beta version? It's newly added into the beta version but I would prefer to just list out the posts without any additional text.

  29. drkknght
    Member
    Posted 3 years ago #

    hi ikki -- not sure what happened, i guess i didn't deactivate the old one properly first.

    anyway, i've since made sure to upload 2.1.1, and it appears to have worked!! the data is a little buggered - i'm assuming i just have to wait a week or so for it to properly accumulate. oddly enough, i still get that "3" after the section title... no idea where that is coming from, but i can live with it :)

    thanks so much for the help with this!!

    best,
    rob

  30. Truth
    Member
    Posted 3 years ago #

    Am using the latest 2.1.1 on my site now, still having the no data issue.

Topic Closed

This topic has been closed to new replies.

About this Topic