Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2009
    Posts
    108
    Plugin Contributions
    0

    help question constant jscript 404 errors

    In my cpanel error logs I have always found constant 404 errors pointing to the file:/modules/pages/product_info/jscript_textarea_counter.js
    This has happened in both 1.3.8 and 1.3.9 Zen Cart versions. Could someone please point me in the right direction to fix this problem? Or is it just customers putting in Search Strings that are too long? If this is the case, how do I go about increasing the value? Thanks.

  2. #2
    Join Date
    Nov 2009
    Posts
    108
    Plugin Contributions
    0

    Default jscript 404 errors

    I'm trying to work out why i'm getting so many 404 errors in my cPanel error log. They all point to:/includes/modules/pages/product_info/jscript_textarea_counter.js

    Here is the code for the current 1.3.9c js file:
    PHP Code:
    /* javascript function to update form field
     *  field        form field that is being counted
     *  count        form field that will show characters left
     *  maxchars     maximum number of characters
    */
    function characterCount(fieldcountmaxchars) {
      var 
    realchars field.value.replace(/\t|\r|\n|\r\n/g,'');
      var 
    excesschars realchars.length maxchars;
      if (
    excesschars 0) {
            
    field.value field.value.substring(0maxchars);
            
    alert("Error:\n\n- You are only allowed to enter up to"+maxchars+" characters.");
        } else {
            
    count.value maxchars realchars.length;
        }

    Shouldn't line 10 say:
    PHP Code:
    field.value field.value.substring(0excesschars); 
    ? I'm no code-pro, so I need confirmation on this.Cheers.

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: constant jscript 404 errors

    "404 Not Found" means ... the file was not found. ie: it's not on your server.
    It would follow that uploading the missing file would stop the not-found condition, thus stopping the errors.

    Additionally, normally there would be an "/includes/" in front of the folder path that you quoted.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Nov 2009
    Posts
    108
    Plugin Contributions
    0

    Default Re: constant jscript 404 errors

    Sorry about that, I left the " includes/" off the description. The .js file is there alright, so I don't know whats going on. There was a hacker trying all sorts of rubbish on the Site today though. Maybe he was typing code into the Search box - is that possible? I've denied his IP now so I guess i'll just keep an eye on the logs and see what happens. Cheers.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: constant jscript 404 errors

    That file is not connected with the search funtionality in any way. It's used only to control text input in textarea fields on the product_info page.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 2 Feb 2014, 04:45 PM
  2. Replies: 2
    Last Post: 5 Dec 2013, 01:07 PM
  3. v150 I am getting jscript errors in IE - HELP!!!
    By pityocamptes in forum General Questions
    Replies: 6
    Last Post: 31 May 2012, 09:58 AM
  4. err: Warning: constant(): Couldn't find constant MODULE_SHIPPING_MZMT_GEOZONE_7_TEXT_
    By ginginca in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 6 Mar 2007, 07:19 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR