mrapino (@mrapino)

Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)

  • mrapino
    Participant

    @mrapino

    I’d say this is an appropriate article on how to properly enqueue jQuery:

    How to Properly Add jQuery Scripts to WordPress

    Also, if you know what script is inserting itself above jQuery, and you have control over how it is enqueued, make sure you enqueue to the footer:

    wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer );

    Make sure your ‘$in_footer’ is TRUE:

    wp_enqueue_script('script-handle', plugins_url('js/script.js' , __FILE__ ),'','1.0',true);


    mrapino
    Participant

    @mrapino

    dwinn,

    I just checked your website, and you have an error in the console:

    Uncaught ReferenceError: jQuery is not defined
        at (index):17

    jQuery not being define can have very negative effects on a website.

    Hope this helps!


    mrapino
    Participant

    @mrapino

    Robin,

    As far as Release 2.6 Candidate 3, the line of code in reply.js on/near line 18 is still the same:

    reply.parentNode.appendChild(respond);

    I changed it to:

    reply.parentNode.appendChild(respond, reply);

    Which seemed to do the trick.

    However, I am unsure what else would be affected by this change, as I am unfamiliar with the core code of this plugin.

    Please submit any or all of my comments about this here. My issue is fixed, and I hope it helps others.

    Cheers!


    mrapino
    Participant

    @mrapino

    Robin,

    I am using Version 2.5.13, directly downloaded from the WP Repository. There doesn’t seem to be an update pushed to the repository yet. I usually don’t install non-production versions on a production website.

    dwinn, I’m sorry to hear that you are having a different issue than I am having. Can you please check the console in Chrome Dev Tools to see if you are getting any errors either before, or when you click the ‘reply’ link?

    Thanks!


    mrapino
    Participant

    @mrapino

    One last thing … so the change doesn’t get overwritten when you update the plugin, copy the entire ‘reply.js’ file, and put that copy in a ‘js’ folder in your theme’s main folder …. so if you’re using TwentySeventeen, as an example, the path would be ‘Themes/TwentySeventeen/js/reply.js’.

    Then you’ll be safe.


    mrapino
    Participant

    @mrapino

    Actually, I figured out what line 18 does.

    I made a change. Instead of commenting it out, I edited it to be:

    reply.parentNode.insertBefore(respond, reply);

    I added “reply” as the second argument being called.

    After I did this, the response box, where you put your comment now moves to right under the post where you click reply.

    Check it out, and let me know if oyu get it working.

    Cheers!


    mrapino
    Participant

    @mrapino

    Hey there … I got mine working.

    There is a file in the bbPress plugin folder

    plugins > bbpress > templates > default > js > reply.js

    On line 18, there is a line of code that is throwing a JavaScript error every time the “reply” link is clicked.

    reply.parentNode.insertBefore(respond);

    I basically commented this line of code out, and threaded replies are working again.

    I have no idea if this line is needed, but it got rid of the error, and there are no new errors to speak of.

    I wish a plugin developer would chime in here, but that doesn’t seem likely.

    I hope this helps you.

    If anyone else reading this know what this line does, and why it was causing the error, please let us know.


    mrapino
    Participant

    @mrapino

    Actually, I spoke too soon, but maybe you have a similar issue.

    My threaded replies are not working due to a plugin conflict.

    I discovered this by disabling plugins one by one, and testing threaded replies after each disable.

    My conflict is with Toolset Layouts.

    Perhaps yours is a plugin conflict, as well.


    mrapino
    Participant

    @mrapino

    Hello … I opened the Chrome dev console, and hitting the reply link gives me a JavaScript error:

    reply.js:18 Uncaught TypeError: Failed to execute 'insertBefore' on 'Node': 2 arguments required, but only 1 present.
        at Object.moveForm (reply.js:18)
        at HTMLAnchorElement.onclick ((index):242)​

    Is this a known bug?


    mrapino
    Participant

    @mrapino

    I am having the same issue. Can anyone chime in that knows what might be happening here? It doesn’t seems like it is working on these support forums either.

    Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)