WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Version Version 2.3.0 breaks the blog (109 posts)

  1. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Alright people, just uploaded v2.3.1. Should be available within the next 30 minutes or less!

    @markross1967 ah, that can be solved using WordPress' template tags. You could modify your theme's sidebar to add another widget area that would display only on that page, for example something like this:

    # In your functions.php
    register_sidebar( array(
    	'name' => __( 'Popular Artwork' ),
    	'id' => 'popular-artwork',
    	'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    	'after_widget' => "</aside>",
    	'before_title' => '<h3 class="widget-title">',
    	'after_title' => '</h3>',
    ) );
    # In your sidebar.php
    if (is_page(your-page-id-here)) {
    	 if ( ! dynamic_sidebar( 'popular-artwork' ) ) : endif;
    }

    ... then, just add the WPP widget to the Popular Artwork sidebar and you're done. The widget will only appear when viewing that specific page.

  2. markross1967
    Member
    Posted 1 year ago #

    Héctor, that is very cool! Thank you! :)

    The function created the sidebar, and I was able to add the widget to it, but the sidebar.php code did not make the new sidebar appear in the Political Artwork page.

    I wonder what I may have done wrong?

    Sidebar code, with Page ID:
    if (is_page('16978')) {
    if ( ! dynamic_sidebar( 'political-artwork' ) ) : endif;
    }

  3. markross1967
    Member
    Posted 1 year ago #

    The problem may lie in the fact that, The Twenty Eleven Theme does not, inherently, display the sidebar. I am using a plug-in called, "Twenty Eleven Theme Extensions," which made it so I can display the sidebar in the theme.

    If there is no simple solution, then, it is probably best to leave good enough alone.

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    I'm pretty sure it can be done easily, you just need to be a little more patient ;) Since you were kind enough to help me debug WPP, I'll take a look at the Twenty Eleven Theme and let you know how to get it working.

  5. markross1967
    Member
    Posted 1 year ago #

    Hi Héctor,
    Thank you! I really appreciate that! But, it isn't something that is extremely important to me - that is why I didn't spend a whole lot of time on it.

    It would still be nice to know how to make it work, however, in the event that I want to use that method in the future. :)

    It would also be cool if it can be integrated into the plug-in.

  6. markross1967
    Member
    Posted 1 year ago #

    Héctor,

    Has anyone commented about the Popular Post "views"?

    I am wondering if they are actually calculating right? I have been getting far more views then prior to the plug-in update. If I am really getting more views, that is great - but, I am a little skeptical of the current count.

  7. jonegarrett
    Member
    Posted 1 year ago #

    Popular post views are way off for me since upgrade as well.

  8. markross1967
    Member
    Posted 1 year ago #

    jone,

    Are they on the high-side? That is what I am experiencing.

  9. jonegarrett
    Member
    Posted 1 year ago #

    Yes. A couple of hundred hits off. I've been watching closely and it is almost like they grow exponentially.

  10. jonegarrett
    Member
    Posted 1 year ago #

    In one case I just released the most boring post ever. It has no more than 30 real hits. It is counting at over 300 right now. The wordpress.com stats and google analytics concur.

  11. markross1967
    Member
    Posted 1 year ago #

    Yes,
    I am seeing similar results.

    My wordpress.com stats are more realistic. The Popular Post stats do look, largely, exaggerated.

    If we downgraded to the previous version, that should tell us if it is, indeed, a programmatic error.

  12. markross1967
    Member
    Posted 1 year ago #

    OK, I downgraded to version 2.2.1, and it did not change or resolve the count issue that I think we are having.

  13. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hey guys,

    Sorry, I haven't been able to check on that. Work projects are keeping me busy at the moment and won't be able to work on the plugin today at least. I think I know what might be causing this and it should be an easy fix if it is what I believe.

  14. markross1967
    Member
    Posted 1 year ago #

    Héctor,
    Do you believe that the integrity of the data is OK, and it is just the way that the data is being displayed that is the problem? In other words, is the real count being stored in the database, and will display correctly once you are able to fix it? Or, will we have to clear the cache and start over?

  15. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Alright guys, here's an update of the situation:

    Long story:

    Found out what went wrong. The new ability to enable / disable ajax update via Settings / WordPress Popular Posts / Tools / Data tools is the culprit.

    For some reason I'm still trying to understand and correct, when viewing any single post / page it ocassionally also updates the views count of another post / page simultaneously - hence why it is doubling the count of some entries.

    Bad news is that after the update to 2.3.0 all views count added to the WP DB tables are wrong. The only workaround to prevent it from continuing doubling the views count is to enable the AJAX update since the problem occurs only when it's disabled.

    I will remove that feature on the next upgrade until a fix is ready, so please keep an eye on your Plugins' page.

    Summary: (for those who don't feel like reading a lot)
    Problem with views count is generated by the new ability to turn on / off the ajax update via Settings / WordPress Popular Posts / Tools / Data tools. Enabling AJAX update "fixes" the problem, it occurs only when it's disabled. A plugin update will follow, this feature will be removed until a fix is ready.

  16. markross1967
    Member
    Posted 1 year ago #

    Hi Héctor,

    Thank you for the update! I will enable that feature for now. But, even my "all-time," most popular post count, will be wrong from here on? :(

  17. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Unfortunately, yes. The all-time data is also affected by this. Enabling the Ajax update will only stop the wrong count update.

    I'm aware of how annoying this is. So, instead of telling you guys how much frustrated I am now, I'm just going to say that I'm sorry and resume the work on the plugin.

    As I told you above, an update has been pushed now and the views count update should work fine from now on. Will push a new update again once I figure out how to solve this problem and the Ajax update feature will be available again.

    My apologies, everyone.

  18. markross1967
    Member
    Posted 1 year ago #

    "My apologies, everyone."

    That is OK Héctor, accidents happen from time to time.

    It would be great if, in the future, there were a way to force a copy of the database tables, once the person "chooses to update."

    That way, in a case like this, perhaps you could have published, how to restore the tables back to that date. Or, better yet, a data restore feature. :)

  19. jonegarrett
    Member
    Posted 1 year ago #

    Thanks Hector! No worries. Enjoy Sunday.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.