Post doubled on main page with "meteor-slide" slideshow (already solved !)

  • Didier Boulay-Claverie

    #1713

    Hello,

    I’d like to share with you a bugfix in Graphene theme found by JLeuze, author of Meteor-Slide extension.

    A post with a Meteor-Slide slideshow displayed on main page ended displayed doubled.

    The params were for WP “display last post” and for Graphene “home page displaying posts filtered by category”.

    The answer is to add after line 41 in index.php :

    wp_reset_query();

    You can read the full explanation here.

    If it doesn’t have any other side effect, this bugfix could be a candidate for the next release.

    Except that little problem, Graphene theme is really a good work. Congratulations.

    Admin

    Syahir Hakim

    #16964

    This bug may be caused by another bug related to the options-defaults.php file, which has been fixed in version 1.5a. Can you try replacing the graphene/admin/options-defaults.php file in your site with the one from version 1.5a here: http://graphene.googlecode.com/svn/trunk/graphene/admin/options-defaults.php

    Also, try temporarily delete the wp_reset_query(); in index.php after you have done the above, and let me know if the bug reappears.

    Didier Boulay-Claverie

    #16965

    Hello,

    I retried with your new options-defaults.php and without the modified index.php.

    => no effect : the diaporama is still displayed x2.

    I made this test with the right + left column layout, with the option “last articles displayed by a selection of caterories”. I have 2 articles : one with a diaporama, and one without.

    I also made a test with the defaut display option “last articles” : with or without your new options-defaults.php, the articles are not displayed on homepage. Right and left columns are only displayed, aligned together at left.

    If I use the modified index.php, this bug is also fixed.

    Admin

    Syahir Hakim

    #16966

    OK, I’ll investigate further.

    Admin

    Syahir Hakim

    #16967

    OK, spent a considerable time investigating this, and it turns out that the bug is actually in the Meteor Slides plugin itself. This is because the plugin creates a new query within the WordPress main query, but didn’t destroy that query data properly after using it.

    The file where this bug is located is meteor-slides/includes/meteor-slideshow.php. The plugin uses the WP_Query class to get the slides, but resets the query using wp_reset_query(). It should be using wp_reset_postdata() instead to clear the custom query data, as wp_reset_query() is for the query_posts() function.

    I’ve posted about this in the WordPress.org Support Forum post you linked above in your first post.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!