WordPress.org

Forums

WP Favorite Posts
[resolved] Solution for Bug in IE Regarding Caching (2 posts)

  1. msumner
    Member
    Posted 2 years ago #

    To reproduce the bug, while logged out add a post to favorites, remove the post from favorites, and then add the same post to favorites again. It gives the success message the second time, but never actually adds it to favorites. This is because IE is caching the response, and the second time around it doesn't actually hit the script.

    To fix, open up wpfp.js and replace this:

    jQuery.get(url, params, function(data) {
        dhis.parent().html(data);
        if(typeof wpfp_after_ajax == 'function') {
            wpfp_after_ajax( dhis ); // use this like a wp action.
        }
        loadingImg.hide();
    }

    With this:

    $.ajax({
        cache: false,
        url: url,
        data: params,
        success: function(data) {
            dhis.parent().html(data);
            if(typeof wpfp_after_ajax == 'function') {
                wpfp_after_ajax( dhis ); // use this like a wp action.
            }
            loadingImg.hide();
        },
    });

    Hope that helps someone.

    http://wordpress.org/plugins/wp-favorite-posts/

  2. msumner
    Member
    Posted 2 years ago #

    Marking as resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Favorite Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.