1

I have my test site doing well on my localhost but when I try to upload it on some free hosting server my firebug says something like these.

Uncaught SyntaxError: Unexpected end of input jquery.js:3
Uncaught TypeError: undefined is not a function bootstrap.min.js:6
Uncaught TypeError: Cannot read property 'fn' of undefined bootstrap-tooltip.js:252
Uncaught SyntaxError: Unexpected end of input ckeditor.js:57
Uncaught ReferenceError: jQuery is not defined jquery.fancybox.pack.js:45
Uncaught ReferenceError: $ is not defined 

Why is that happening?

1 Answers1

0

The 3 most common causes for the Unexpected end error in my experience:

  1. The file upload was not completed successfully. Even though some tools like FileZilla may give a successful message, it does not necessarily mean that the server stored the file correctly. Better to download the file back and check against the original to be sure.
  2. Malfunctioning/badly configured servers may cut up the response or error out before serving the whole file.
  3. You may have a syntax error in your JS. (for example an unmatched brace will thrown this error).

As you can see, #3 is the actual reason why the error is thrown, while #1 and #2 will cause it to happen.

Community
  • 1
  • 1
Fabrício Matté
  • 65,581
  • 23
  • 120
  • 159