WordPress.org

Forums

WooCommerce - excelling eCommerce
JS in page footer is missing "http:" reference. Anybody else? (7 posts)

  1. sarthaksinghal
    Member
    Posted 1 year ago #

    Example: <script type='text/javascript' src='//

    It does not look like a theme issue, but open to suggestions to fix it. Getting 404 errors with it.

    Using mystile theme with plugin version 2.1.9

    Some example JS are below but not limited to only these:
    woocommerce/assets/js/frontend/add-to-cart-variation.min.js
    woocommerce/assets/js/frontend/cart-fragments.min.js
    woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js

    Any suggestion to fix them is welcome.
    Thanks

    https://wordpress.org/plugins/woocommerce/

  2. lorro
    Member
    Posted 12 months ago #

    Some of my links are like that, without the protocol, yet everything works in my case. Please post the url to the page.

  3. sarthaksinghal
    Member
    Posted 12 months ago #

    @Iorro

    The url is: http://www.naturelounge.in/store/anti-leech-socks/
    Things seem to be working fine for this project as well, but there are 404 errors reported as below example url

    http://www.naturelounge.in/www.naturelounge.in/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js
  4. lorro
    Member
    Posted 12 months ago #

    I tried your 3 example broken links and my browser found them OK.

    I loaded the page and the console found no 404s but several timeouts.

    I've used my favourite link checker, Xenu, and its not found any broken links like your examples, but it did find a lot of time-outs. I checked your site with the ping command, and its giving 140ms, compare with a more normal 30ms. Could be you have slow hosting or maybe its just a slow line from here. However, 404s are not the result of a slow host.

    If I don't see 404 errors and you do, have you cleared your browser cache.

    Your theme is not quite the latest version 1.3.1.

  5. sarthaksinghal
    Member
    Posted 12 months ago #

    @Iorro Thanks for you help
    The link to see would be http://www.naturelounge.in/store/anti-leech-socks/

    I then went on to see the source and found the same issue of http missing again(after cleaning up the cache)
    Example: Search for "wc_add_to_cart_params" and just belo it you would see an like below:

    <script type='text/javascript' src='//www.naturelounge.in/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js'></script>

    The theme has been updated for the project :) Thanks

  6. lorro
    Member
    Posted 12 months ago #

    I went to the link in your last post and there are no javascript errors in my browser console. The page looks good. I went to the code snippet and, yes there isn't an "http:" but nevertheless my browser found the file straight off.

    A 404 when the file is actually there means its not really a file-not-found error. It must mean something else, possibly slow server response.

    You could try different browsers to rule out a browser-specific issue. Check your server error log for clues if you have cpanel access or similar. Ask you host's support if they can help.

  7. sarthaksinghal
    Member
    Posted 12 months ago #

    @Iorro Thanks a lot for your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.