Forum Discussion
Strange error message in console
Hi,
I've just updated an old course and uploaded that's taking a long time to load and sometimes does not load at all. The updates I made we simple text changes and nothing else.
In the browser console the error I'm getting is:
ds-frame.desktop.min.js:2 could not find slide in string table npnxnanbnsnfns00000000001
Digging into that I think it's a SCORM issue but I'm not too sure. Has anyone had any experience with this?
Thanks,
Ben.
- MathNotermans-9Community Member
As Kate already states in the beginning of this thread... JQuery is removed from Storyline. Thus all code using JQuery will fail if you not add the JQuery library manually to Storyline or replace all code using JQuery by Vanilla Javascript.
Here some links on converting JQuery to Vanilla Javascript:
https://vanillajstoolkit.com/reference/
https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/
http://youmightnotneedjquery.com/- AhmadHabhab-ba6Community Member
Hello Math,
Can you please show me how to manually add Jquery library manually to my storyline projects?
Cause I'm having the same issue in my console, its not showing the work flow...
Thanks in advance.
- MathNotermans-9Community Member
A few options to add jQuery to Storyline ( 3, 360... any version ) manually.
You can add these lines to the html that runs your story...<!--Added jQuery -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<!--END addition -->
Depending on your usage that can be the index.html and/or index_lms.html in the Articulate folder on your computer in either or both the classic and unified folder.
If you choose this approach best to copy the lines of code from online jQuery repository..as you need the proper hash/sha code to ensure its ok. Do this at https://code.jquery.com/
This for sure is the easiest option, ensuring all projects you publish will have jQuery included. Whenever Articulate updates Storyline you have to redo this as the files will be replaced.
Another Approach
Second option is adding jQuery as a Webobject to a specific project.
Basically you add JQuery as a WebObject on a separate slide. Then you load the scripts needed on the first frame. The folder you load needs to have a index.html and all the external scripts you want to load.
As you see in the image below i have all scripts i use in separate folders. And a empty index file to make it loadable as WebObject.
The biggest drawback of using WebObjects is, that when you change anything in your folders, you need to delete the WebObject in Storyline and add it new...as Storyline copies the Webfolder structure internally...and changes wont work unless you actually remove and add it again. So its good practice to only add reusable libraries there.
On the first frame of my course i then load jQuery.
With this script...var loadedCount = 0;
var amountOfLibs = 1;
var player = GetPlayer();
function loadJSfile(filename, filetype){
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script');
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", filename);
fileref.onload = function() {
loadedCount++;
console.log(loadedCount+" JS / "+filename+' loaded.');
if(loadedCount >= amountOfLibs){
player.SetVar("javascriptsLoaded", true);
}
};
}
else if (filetype=="css"){ //if filename is an external CSS file
var fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet")
fileref.setAttribute("type", "text/css")
fileref.setAttribute("href", filename);
fileref.onload = function() {
loadedCount++;
console.log(loadedCount+" CSS / "+filename+' loaded.');
if(loadedCount >= amountOfLibs){
player.SetVar("javascriptsLoaded", true);
}
};
}
if (typeof fileref!="undefined")
document.getElementsByTagName("head")[0].appendChild(fileref)
}
/*
When we change anything in the scriptFolder this needs to change
*/
var scriptFolder ="story_content/WebObjects/69PeU1oP5RP/";
/*
And lastly we call the functions we want to run
*/
loadJSfile(scriptFolder+"JQUERY/jquery-1.10.2.min.js", "js");
Notice i have a variable amountOfLibs set to 1, thus only loading jQuery. I often use more thirdparty libraries and thus change that to the amount of libraries wanted.
If you check my posts, im sure there will be samples with this code in it ... so download those for ease.
Do watch the line where i set the variable scriptFolder. You need to ensure on first publish this is correct.
I always have a variable called 'javascriptsLoaded' in my files. I set that to true when my libraries are loaded and from then on i can use anything in them.
So adding a trigger to watch that variable to change...
And then calling this:$(".top-ui-bg").css("background-color", "#FFFFFF00");
$(".area-primary").css("background-color", "#FFFFFF00");
$(".cs-slide-container").css("background-color", "#FFFFFF00");
if (jQuery) {
// jQuery is loaded
console.log("Yeah! JQuery available");
player.SetVar("jQueryAvailable",True);
} else {
// jQuery is not loaded
console.log("Oh my it doesn't Work");
}
The if then check is not really needed, as i know jQuery is loaded at that point, but better be sure.
One thing that is missing in this method. On a resume you skip the first page and jump to another slide in the course and thus miss all initializations. You could add it to the Slide Master, but i dislike that, because that means you have it on every page. One of the reasons i did a feature request for a custom resume page. So you can ensure the proper needed extra libraries are loaded on the custom resume page.
Added a working sample.
Hi Ben. Thanks for those helpful screenshots!
Does your course have any custom Javascript? Since jQuery has the potential to be exploited and Storyline 360 no longer uses it, we removed jQuery from Storyline 360 on January 21, 2020.
My hunch is that error could be related to this change, but our Support Engineers are happy to take a closer look. If you can upload the course file through this secure link for testing, that would be gold!
- BenJohnson-7127Community Member
Thanks Kaite, I've uploaded the course as suggested.
- SungminHongCommunity Member
Hi Sungmin,
I'd love to have you work with our Support Team as well! I've opened up a case for you, so they'll be in touch soon!
- BenJohnson-7127Community Member
Hey Sungmin,
I wouldn't bother, I uploaded my course 4 months ago and never heard back...Storyline is fast going down the drain.
- JustinStaff
I'm really sorry to hear that you didn't get our most recent email message, Ben. I can see that Lianne Budomo sent you a detailed diagnosis on 5/4, so I'll re-send that to you now. Please let us know if you don't receive it this time around!
- vamsikrishna-03Community Member
hi ben , I am also experiencing the similar issue , could you please help me what did you do to resolve this issue
Hi Vamsi,
Thanks for reaching out that you are experiencing a similar issue.
I took a look at the cases that Ben and Sungmin worked on with our team and it looks like we did not hear back from the users to reach a conclusion.
I appreciate you contacting our support team directly as well and can see that you're currently working with Lejan.
- alexmurzakuCommunity Member
Did you reach any conclusion on what causes this behavior?
We do have custom JavaScript in approximately 10% of the slides, but this happens exactly every time a slide auto-advances. These slides have video or audio being played automatically.
could not find slide in string table npnxnabnsnfns01001000101
ds-frame.desktop.min.js line 2382:112
{
key: "getString",
value: function(e) {
var t = this.currLayout.string_table,
n = this.frame.stringTables[t].string[e];
return null == n ? (console.warn("could not find " + e + " in string table " + t), e.replace("acc_", "")) : n
}
} Hello Alex and welcome to E-Learning Heroes 😊
Thanks for reaching out and sharing that you are running into a similar issue.
I cannot speak for the users here, but I do not have any updated information from the support cases since we did not hear back to reach a conclusion.
With your permission, I'd like you to share your project file with our support engineers to investigate what's happening. You can share it privately by uploading it here. It will be deleted when troubleshooting is complete.
- alexmurzakuCommunity Member
Thank you, Leslie. Will upload the file at the link you provided. Look forward to hearing from you.