• Resolved Phil Marnell

    (@entrepreblog)


    Working with the p2 breathe theme, and I’ve iterated thru a couple of instance, but at some point in both, the POST button stops responding.

    It works fine…it works fine…it works fine…and then:

    It just appears to be dead.

    There’s nothing in debug log, nothing in error log.

    Can someone shed some light on where to look to find a resolution?

    Thanks.

    I see the following messages in console

    Uncaught TypeError: Cannot read property ‘length’ of null
    at i.render (comment.js?ver=5.3.2:378)
    at i.addOneCommentView (post.js?ver=5.3.2:759)
    at underscore.min.js?ver=1.8.3:1
    at Function.v.each.v.forEach (underscore.min.js?ver=1.8.3:1)
    at i.forEach (backbone.min.js?ver=1.4.0:1)
    at i.renderComments (post.js?ver=5.3.2:564)
    at i.render (post.js?ver=5.3.2:548)
    at i.addOne (posts.js?ver=5.3.2:153)
    at underscore.min.js?ver=1.8.3:1
    at Function.v.each.v.forEach (underscore.min.js?ver=1.8.3:1)
    new-post.js?ver=5.3.2:112 Uncaught TypeError: Cannot read property ‘posts’ of undefined
    at i.onSave (new-post.js?ver=5.3.2:112)
    at HTMLElement.dispatch (jquery.js?ver=1.12.4-wp:3)
    at HTMLElement.r.handle (jquery.js?ver=1.12.4-wp:3)

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator t-p

    (@t-p)

    Have you tried:
    – deactivating ALL (yes all) plugins temporarily to see if this resolves the problem (plugin functions can interfere). If this works, re-activate them individually (one-by-one) to find the problematic plugin(s).
    – switching to the unedited default Theme (Twenty Twenty, etc.) for a moment using the WP dashboard to rule out any theme-specific issue (theme functions can interfere like plugins).

    Thread Starter Phil Marnell

    (@entrepreblog)

    I have done the first step in previous instance, but not the second.

    I’ll do both and see the results.

    Thanks.

    Thread Starter Phil Marnell

    (@entrepreblog)

    Disabled all plugins. In this theme, POST function is in the o2 plugin, which helps to isolate a little, I guess.

    To check native POST ability, I switched to twenty-nineteen theme, and POST works as expected.

    Re-enabled o2 plugin, and the result was the same – POST button not responding.

    The errors (2) below appear in the console. For the first one, the userLogin value and length are present up to line 375, but something happens to the userLogin value in ‘jsonification’ (jsonifiedModel = this.model.toJSON();

    TypeError: jsonifiedModel.userLogin is nullcomment.js:378:4
        render https://go7c.net/c90/wp-content/plugins/o2-master/js/views/comment.js?ver=5.3.2:378
        addOneCommentView https://go7c.net/c90/wp-content/plugins/o2-master/js/views/post.js?ver=5.3.2:759
        Underscore 2
            y
            forEach
        $/</i.prototype[e]</< Backbone
        renderComments https://go7c.net/c90/wp-content/plugins/o2-master/js/views/post.js?ver=5.3.2:564
        render https://go7c.net/c90/wp-content/plugins/o2-master/js/views/post.js?ver=5.3.2:548
        addOne https://go7c.net/c90/wp-content/plugins/o2-master/js/views/posts.js?ver=5.3.2:153
        Underscore 2
            y
            forEach
        $/</i.prototype[e]</< Backbone
        render https://go7c.net/c90/wp-content/plugins/o2-master/js/views/posts.js?ver=5.3.2:122
        initialize https://go7c.net/c90/wp-content/plugins/o2-master/js/app/main.js?ver=5.3.2:136
        Backbone 2
            Router
            i
        start https://go7c.net/c90/wp-content/plugins/o2-master/js/app/main.js?ver=5.3.2:507
        <anonymous> https://go7c.net/c90/:855
        jQuery 4
            i
            fireWith
            ready
    
    This error also appears in the console on POST button:
    
    TypeError: o2.App is undefinednew-post.js:112:4
        onSave https://go7c.net/c90/wp-content/plugins/o2-master/js/views/new-post.js?ver=5.3.2:112
        onSave self-hosted:876
        jQuery 2
            dispatch
            handle
    Thread Starter Phil Marnell

    (@entrepreblog)

    UPDATE:

    All plugins are deactivated
    Deleted/removed the p2-breathe theme
    Deleted the o2-master plugin
    Reinstalled theme from fresh zip file
    Reinstalled o2 plugin from zip file
    Restarted Apache

    Same result, same console messages as above

    Does anyone have any ideas/suggestions?

    Thread Starter Phil Marnell

    (@entrepreblog)

    ANOTHER UPDATE:

    All plugins are deactivated
    Deleted/removed the p2-breathe theme
    Deleted the o2-master plugin
    Found and deleted all database references using phpMyAdmin SEARCH
    Reinstalled theme from fresh zip file
    Reinstalled o2 plugin from zip file
    Restarted Apache

    Same result, same console messages:

    TypeError: jsonifiedModel.userLogin is nullcomment.js:378:4
    render https://go7c.net/c90/wp-content/plugins/o2-master/js/views/comment.js?ver=5.3.2:378
    addOneCommentView https://go7c.net/c90/wp-content/plugins/o2-master/js/views/post.js?ver=5.3.2:759
    Underscore 2
    y
    forEach
    $/</i.prototype[e]</< Backbone
    renderComments https://go7c.net/c90/wp-content/plugins/o2-master/js/views/post.js?ver=5.3.2:564
    render https://go7c.net/c90/wp-content/plugins/o2-master/js/views/post.js?ver=5.3.2:548
    addOne https://go7c.net/c90/wp-content/plugins/o2-master/js/views/posts.js?ver=5.3.2:153
    Underscore 2
    y
    forEach
    $/</i.prototype[e]</< Backbone
    render https://go7c.net/c90/wp-content/plugins/o2-master/js/views/posts.js?ver=5.3.2:122
    initialize https://go7c.net/c90/wp-content/plugins/o2-master/js/app/main.js?ver=5.3.2:136
    Backbone 2
    Router
    i
    start https://go7c.net/c90/wp-content/plugins/o2-master/js/app/main.js?ver=5.3.2:507
    <anonymous> https://go7c.net/c90/:855
    jQuery 4
    i
    fireWith
    ready

    This error also appears in the console on POST button:

    TypeError: o2.App is undefinednew-post.js:112:4
    onSave https://go7c.net/c90/wp-content/plugins/o2-master/js/views/new-post.js?ver=5.3.2:112
    onSave self-hosted:876
    jQuery 2
    dispatch
    handle

    Thread Starter Phil Marnell

    (@entrepreblog)

    Refreshed everything and so far it’s working as expected.

    Thread Starter Phil Marnell

    (@entrepreblog)

    Moderator t-p

    (@t-p)

    Glad its sorted 🙂

    Thread Starter Phil Marnell

    (@entrepreblog)

    Maybe I should win some kind of award for being able to break WP.

    I was as careful as I could be with trying to get a site looking/behaving the way needed, and this exact same problem is back!

    There is one additional tidbit: I noticed that when the problem reappeared, it was accompanied by all previous POSTs _dis_appearing for the logged-in user! They’re still there, only not showing up, probably due to something with the missing login information.

    I changed functions.php, with the bare minimum to do what was needed.

    Did I keep a copy of the original? Yes
    Once the problem re-emerged,…
    Did I revert my changes, one by one? Yes
    Did I restore the original object? Yes
    Did I disable all plugins? Yes
    Did I disable o2 plugin, and switch to theme TwentyNineteen? Yes
    Did I restart Apache multiple times in the process? Yes

    For all of those steps:
    Did it make a difference? N O

    Difficult to imagine this theme is so brittle; or is there some cacheing or something being updated that needs to be cleared, in order to get things back to a ‘factory default’ p2/o2 state?

    Thread Starter Phil Marnell

    (@entrepreblog)

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘p2 breathe – post button stops working’ is closed to new replies.