WordPress.org

Ready to get started?Download WordPress

Forums

Latest Tweets Widget
[resolved] Showing serialized data, messing up markup, sometimes (11 posts)

  1. elclanrs
    Member
    Posted 9 months ago #

    I'm experiencing same issue. Works on localhost but not on public site, it shows serialized data, and the markup gets messed up, making my footer and other elements move out of place.

    Screenshot: http://i.imgur.com/Tcnuety.png.

    It seems like sometimes it works when you refresh. Also I get an error in the console, even tough the tweets show up:

    Failed to load resource: the server responded with a status of 400 (Bad Request)
    https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=twittername&count=3&callback=jQuery19106439185049384832_1381483169508&_=1381483169509
    

    The object from the error looks like this:

    jquery19106439185049384832_1381483169508({"errors":[{"message":"Bad Authentication data","code":215}]});
    

    The tweets show up even when the serialized data wrongly appears.

    http://wordpress.org/plugins/latest-tweets-widget/

  2. timwhitlock
    Member
    Plugin Author

    Posted 9 months ago #

    This is not my plugin.
    My plugin does not use jquery or ajax.

  3. elclanrs
    Member
    Posted 9 months ago #

    That's just the response from Twitter. The plugin shows serialized data next to the tweets but not always. This started to happen recently, so maybe it has to do with Twitter, but maybe somewhere in the plugin I imagine the data is leaking and thus showing up in the markup, what do you think?

  4. timwhitlock
    Member
    Plugin Author

    Posted 9 months ago #

    This example you've given:

    jquery19106439185049384832_1381483169508......

    .. is a jQuery JSONP callback. My plugin does not use any jQuery, any JSONP or in fact any Javascript. For this reason I am certain you are commenting on the wrong plugin.

  5. elclanrs
    Member
    Posted 9 months ago #

    Oh my bad, you're right about that, that json response is from an old jquery plugin I was using, I removed the code but I still get the serialized data sometimes. I'm sure yours is the plugin I'm using (just checked), and I saw this other thread with same issue http://wordpress.org/support/topic/broken-widget-showing-serialized-data?replies=3

  6. elclanrs
    Member
    Posted 9 months ago #

    This doesn't happen on localhost, I'm starting to think that maybe the response takes too long (the website is abnormally slow), and something weird happens... I'm clueless. Is it maybe a cache problem? I'm using Super Cache, and tried cleaning it up.

  7. timwhitlock
    Member
    Plugin Author

    Posted 9 months ago #

    Fair enough.

    However, I closed that thread because I cannot reproduce an error in the plugin itself. As per my comments on that thread, all data deserialization uses WordPress's internal cache. This plugin does not serialize or unserialize any data directly.

    My only suggestions are to use APC cache instead of relying on WordPress. Or upgrade WordPress if you have an old version.

  8. elclanrs
    Member
    Posted 9 months ago #

    I will contact administrator and see if this is a problem with the cache, it's very likely that it is now that I see the symptoms... The website is running on a substandard Windows server. Will post back if I find something useful.

  9. timwhitlock
    Member
    Plugin Author

    Posted 9 months ago #

    If another plugin attempts to override WordPress's internal caching then I can't comment on what it might do. I'm using the cache as per the WordPress Transients API.

    I'd recommend always having your localhost identical to your live host in as many respects as possible. At the very least the same plugins and version of WordPress.

  10. timwhitlock
    Member
    Plugin Author

    Posted 9 months ago #

    Incidentally, if your whole pages are cached by SuperCache or whatever else, you may as well disabled the caching of tweets, which might sort the problem. See the notes for the filter to do that.

  11. elclanrs
    Member
    Posted 9 months ago #

    Thanks, will look that up.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags