Posted on

jQuery YoxView “Error loading language file”

A quick note for all googlers: If you happen to stumble upon this error when using the great YoxView plugin for jQuery, make sure you don’t put the script in a folder that has “jquery.yoxview” in it’s name. There’s a bug in the script which uses a loose regular expression, which, when provided the following URL
http://example.com/js/jquery.yoxview/jquery.yoxview.2.21.min.js
will return
http://example.com/js/
and thus will try to request the language files from e.g. http://example.com/js/lang/en.js

I have the habit of unzipping the archive and using a full script name + version for the folder name, which has the benefit, that when you change the script version, all your returning visitors will definitely get the latest script since the cache for it will not exist.

6 thoughts on “jQuery YoxView “Error loading language file”

  1. you don’t make yourself very clear. i have 5 years coding experience and your description is bamboozling!

    1. Hey, if you need more info please feel free to ask or contact me by email: info at tauron dot si

  2. His description was clear to me and I dont consider myself a programmer at all!

    Basically Sam, no fullstops in the directory name….

  3. I have put all of the yoxview files and folders into my js folder

    and no folder is names jquery.yoxview

    there are some files called jquery.yoxview …
    – jquery.yoxthumbs.js
    – jquery.yoxview-2.21.js
    – jquery.yoxview-2.21.min.js

    i removed jquery from the names of those files but then the plugin broke totally.

    Any ideas as to why i am getting this error still?

    thanks!

    1. Sorry, I missed your comment as there was a ton of spam. Now I’ve cleaned the comments and moved the site to a new domain.
      Anyway, what you want to do is to open up the web inspector or firebug and see the network tab. The network request for the language file should be there. Hopefully you can make some sense what is going on. I am thinking you maybe had the web root in a sub directory or something that again confused yoxview.

  4. Great THANKS !!! I was very asking the answer !

Leave a Reply

Your email address will not be published. Required fields are marked *