• Resolved studio1337

    (@studio1337)


    Hello,

    I’m having some difficulties getting WPDiscuz up and running. Installation went fine. I went through settings and got everything exactly as I wanted. Right now, I can see the “Notify” box and the textarea where visitors write their comments. But there’s no button (or captcha) to make a post.

    I’ve been scouring settings to see if something was misconfigured, but I also checked the browser console, and I found the following error:

    ReferenceError: Cookies is not defined | wpdiscuz.js:367:1

    When I saw that, I figured it was best to make sure there wasn’t a bug or an obvious fix to my problem. We’re not running any competing commenting system, and caching is turned off for this page. Any assistance would be most appreciated!

    Link to the page: https://bit.ly/2m0D080

    Thanks!
    Paul

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author gVectors Team

    (@gvectors-team)

    could you please disable security plugins or something like that. something is blocking cookie js file and doesn’t allow to load. It also maybe blocked by hosting service. What hosting you use?

    Thread Starter studio1337

    (@studio1337)

    Thanks for the response. I tried disabling security (we use iThemes Security Pro), but this did not solve the issue. Turning off security wouldn’t be an option in the long run regardless, but this doesn’t appear to be the problem.

    This particular client uses MDTMI for hosting. The hosting/server is your typical Linux + cPanel. They do not restrict use of plug-ins or any technologies.

    Plugin Author gVectors Team

    (@gvectors-team)

    Thread Starter studio1337

    (@studio1337)

    I’ve removed Google Tag Manager from the page (I’ll check with the client on whether they stopped using a feature and need it removed site-wide). But it is not showing up in the network view in inspector any longer. The only 404 is for a woff file – no relation to the .js cookie file.

    I did notice this:

    —–
    Request URL:https://[www.domain.com]/bin/plugins/wpdiscuz/assets/third-party/cookie/js.cookie.js?ver=2.1.3
    Request Method:GET
    Status Code:404 Not Found
    —–

    The file doesn’t appear to be there at all.

    Plugin Author gVectors Team

    (@gvectors-team)

    Could you please rename this file
    wpdiscuz/assets/third-party/cookie/js.cookie.js

    to something like this:
    wpdiscuz/assets/third-party/cookie/js.myjs.js

    Then change this in wpdiscuz/wpdiscuzCore.php file. Find this lines:

     wp_register_script('wpdiscuz-jquery-cookie', plugins_url(WPDISCUZ_DIR_NAME . '/assets/third-party/cookie/js.cookie.js'), array('jquery'), '2.1.3', true);
            wp_enqueue_script('wpdiscuz-jquery-cookie');

    And change to this:

     wp_register_script('wpdiscuz-jquery-myjs', plugins_url(WPDISCUZ_DIR_NAME . '/assets/third-party/cookie/js.myjs.js'), array('jquery'), '2.1.3', true);
            wp_enqueue_script('wpdiscuz-jquery-myjs');
    Plugin Author gVectors Team

    (@gvectors-team)

    Also please read this article:
    https://docs.woocommerce.com/document/jquery-cookie-fails-to-load/
    This is related to WooCommerce but the issue is similar and doesn’t depend on plugin, it depends on server.

    Thread Starter studio1337

    (@studio1337)

    Hello,

    Updating the line you posted didn’t work, but I found this line:

    wp_register_script('wpdiscuz-cookie-js', plugins_url(WPDISCUZ_DIR_NAME . '/assets/third-party/cookie/js.cookie.js'), array('jquery'), '2.1.3', false);
    wp_enqueue_script('wpdiscuz-cookie-js');

    And I updated that one to:

    wp_register_script('wpdiscuz-ffccucookie-js', plugins_url(WPDISCUZ_DIR_NAME . '/assets/third-party/cookie/js.ffccucookie.js'), array('jquery'), '2.1.3', false);
    wp_enqueue_script('wpdiscuz-ffccucookie-js');

    That worked! I received a “Post Comment” button this time.

    What do you make of this? Does this mean there is indeed a conflict? It looks like it’s not a host issue this time. The next time wpdiscuz is updated, the fix will be overwritten. What would be the way to proceed from here?

    Thanks for your help with this!

    Thread Starter studio1337

    (@studio1337)

    I’m not sure how this got marked as resolved. It seems to me we’ll have to go through this procedure every time the plug-in gets updated, and that’s definitely not a viable solution.

    Is the change I made indicative of a change that’s being made within future releases of the plug-in? Will the names be different the next time, and manually updating them won’t be necessary? If that’s the case, then this *is* resolved. I’m just curious whether the issue is fixed permanently or temporarily.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Post New Comment Button Not Showing (wpdiscuz.js error)’ is closed to new replies.