[resolved] NaN new update(s) message (4 posts)

  1. mhovey
    Posted 3 years ago #

    Every 30 seconds my WP blog (using P2) throws up a little dialog at the bottom of the browser that says, "NaN new update(s). Go to homepage."

    This appears with the latest Safari, Firefox and Chrome on a Mac, and IE 10 on a PC, and Safari on iOS (basically every browser I can easily test). Interestingly, I even see this when previewing the P2 theme in the wordpress.org theme browser.

    Is anyone else seeing this? Is there a patch or fix?



  2. mhovey
    Posted 3 years ago #

    Some more info. The if statement at line 896 of p2.js seems to be the source of this message.

    if (!isFirstFrontPage || (typeof newPosts.html == "undefined") ) {
    newUnseenUpdates = newUnseenUpdates+newPosts.numberofnewposts;
    message = p2txt.n_new_updates.replace('%d', newUnseenUpdates) + " "+p2txt.goto_homepage+"";

    I tried adding a check for isNaN(newUnseenUpdates) nested inside this if statement, just to make the "NaN new updates" message stop appearing, but this seemed to cause other issues. Disclaimer: I'm not a javascript or PHP developer.

  3. mhovey
    Posted 3 years ago #

    I've tried testing with a clean install of WP 3.5.1 and P2 1.4.3 on a different server and I see the same issue. I can't believe I'm the only one seeing this.

    I'd hate to have to stop using P2 -- it's the only thing I've found for allowing my users to post on the main page. They would be lost trying to post from the Dashboard.

    How would I revert to an older version of P2? Maybe that will make this go away.

  4. mhovey
    Posted 3 years ago #

    I pulled down the latest from the subversion repository and it seems to have fixed the issue.

    When installed, the version is listed as 1.4.4-wpcom


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic