Forum Index

No notifications
Notifications

Favorites

No favorites found
General Training Discussion General chat and comment on KnowledgeKube training
KnowledgeKube Training > General Training Discussion > Custom Scripts Error View modes: 
User avatar
KnowledgeKube Staff
KnowledgeKube Staff
matt.pitman - 25/08/2016 09:19:46
   
RE:Custom Scripts Error
Hi again Ram, The tilde (~) character is a substitute for the home directory of whatever site hosts the script file. When you reference a script located on an external site, that site will likely include all of the supporting code needed to utilise that script. If you create a copy of that script on your site without also copying all of the supporting code over, when the script replaces tildes with your own site's address it will attempt to locate the non-existent supporting code on your site. I can't see any reason for you to want to replicate JQuery 2.1.4 on your site unless you intend to make customisations not present in the original master copy. I hope this makes sense.

User avatar
Advanced member
Advanced member
   
RE:Custom Scripts Error
Hello sir Matt, The scripts works by having it externalized. Now my question would be, how come it doesn't work when it is not externalized? Does that mean that the scripts that are not externalized is meant only for custom scripts not for scripts such as jquery and the likes? Thanks!

User avatar
KnowledgeKube Staff
KnowledgeKube Staff
matt.pitman - 24/08/2016 09:57:58
   
RE:Custom Scripts Error
Hi Ram, Can I confirm you have omitted the scheme part of your external script's URL (e.g. https: or http:)? If you look at the MS-CDN-JQuery external script, the URL simply begins with //. Try emulating this for your 2.1.4 script and see if that makes any difference. Thanks.

User avatar
Advanced member
Advanced member
   
Custom Scripts Error
Hello, I have imported a script (jquery 2.1.4) in my repository. As I load my web page in the live version, it gives me an error pointing to the script that I have made. Upon checking the script as the site loads it changes the script character ~(tilde) to the domain name which make it return an error. How can I bypass this one? All scripts with the ~(tilde) that I imported are changed to the domain name of the site. Thanks!

RSS Feed