Support » Theme: P2 » NaN new update(s) message

  • Resolved mhovey

    (@mhovey)


    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?

    Thanks,

    Matt

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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+"";
    p2.utility.notification(message);
    }

    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.

    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.

    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

    https://wpcom-themes.svn.automattic.com/p2

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘NaN new update(s) message’ is closed to new replies.