• Resolved John

    (@dsl225)


    Hello,

    I get lots of 404 errors that point to this script which is referenced at all my pages:

    <script type='text/javascript' src='https://.../wp-content/plugins/ultimate-product-catalogue/js/catalogue-style-.js?ver=4.9.6'></script>

    It seems there is no such file in plugin’s folder.
    Any clues?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi John,

    This file and associated error is in relation to a new feature we’re working on for adding more catalogue styles. It dynamically loads the corresponding JavaScript file and CSS. At the moment, there is no corresponding js or css files, which is why you’re getting those messages. They won’t cause any issues except for the sight of the errors in the console. That being said, if you’d like, you could just completely remove those lines of code for now. They’re in the “UPCP_Main.php” file. You can look for the following lines:

    wp_enqueue_script('upcp-theme-js', UPCP_CD_PLUGIN_URL . 'js/catalogue-style-' . $Catalogue_Style . '.js', array( 'jquery' ));
    
    elseif ($Catalogue_Style != “None”) {wp_enqueue_style( 'catalogue-style-' . $Catalogue_Style, UPCP_CD_PLUGIN_URL . 'css/catalogue-style-' . $Catalogue_Style . '.css');}
    Thread Starter John

    (@dsl225)

    Thanks for the clarification.
    The problem with this is when you are using a security plugin that blocks users after a certain amount of 404 errors from the same host.

    That was my case with iThemes Security where I limit those errors to 20/host for a ceratin amount of minutes, in order to prevent malicious attacks.
    As this appears in each and every page, this amount was reached very fast!

    I found out that I can whitelist a given file from this process and I did so with this file: /wp-content/plugins/ultimate-product-catalogue/js/catalogue-style-.js and the error doesn’t show up in logs anymore and I think – as far as I’m concerned – that the problem is solved.

    As this site is still in development at a temporary address, this was easy to monitor as we are only a few people having access there.

    But I would be concerned about other users with same issue and similar security settings where they will block a bunch of visitors without being aware!

    Hi John,

    Thank you for the update and for letting us know about what was happening with iThemes Security. We’ll look to remove the references to the JS while we work on this feature, to help ensure others don’t run into the same thing. Thanks for the info!

    Thread Starter John

    (@dsl225)

    Thanks!

    Thread Starter John

    (@dsl225)

    I wanted to remove those lines you indicated above at file “UPCP_Main.php” but can’t find any string similar to this. Could you please indicate corresponding line numbers?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Non-existant JS script in pages?’ is closed to new replies.