Uncaught range error in trivantis-cookie.js

avanneer9353
avanneer9353 Community Member Posts: 10
Hi :)

I send the same issue to Trivantis support, but just in case someone else is working in the weekend as well..

I come across an 'Uncaught range error, maximum call stack size exceeded' in the trivantis-cookie.js. At first I thought the problem was caused by an additional js-library, but the problem also accurs without it. Functions such as 'on page show change contents to currentchaptertitle' or variables such as 'pagesintitle' are not working as they should. It seems like Lectora Online cannot handle the amount of js that is needed to make the title work.

In running mode it all works well, but the external html cannot be tested. I build a small loop (overview - 7 sections, after completing section return to overview). If I delete this page, the title seems to be working again. On this page only functions from Lectora itself are used.

Any ideas...?
Thanks!

Comments

  • jvalley4735
    jvalley4735 Community Member Posts: 1,357
    Following
  • agaudet1236
    agaudet1236 Community Member Posts: 36
    Not sure if this already got resolved  but the only time I tend to see this is when I inadvertently create an infinite loop of some sort.
  • avanneer9353
    avanneer9353 Community Member Posts: 10
    Hi Andrew,

    Thanks for your reply. The problem is not resolved yet (I have not yet received word from Trivantis Support unfortunately). The situation in short:

    Chapter Name
    - Page Overview (OnPageShow -> showImageDone -> if Section One Is Completed)
    -- Section One
    ---Page
    ---Page
    ---Page - return to Overview
    --Section Two
    ---etc.

    Seems to me a simple construction which I have used many times, at least in Lectora Publisher. I've also tested if the problem has something to do with sections that need to be completed (I did have some issues earlier with sections in LO), but when I try the same thing on a Chapter or even just a Page being completed, I get the same error. It all works well when testing in Run Mode.

    I've just now exported the pkg and opened it in Lectora Publisher. Offline it all works just fine..
  • avanneer9353
    avanneer9353 Community Member Posts: 10
    Additionaly, it does have to do with our js-library, but it is a combination of that library and the way js-scripts are loaded in Lectora Online.

    There was a small patch recently regarding 508 compliance. “HTML Extension objects were always pushed to the top div order, this is improper behavior that was introduced when we released 3.0. HTML Extension objects should maintain their layer order.” Due to this patch, we had to make changes to our own js-library:

    “For our custom Lectora javascript exercises we need to retrieve the pageDiv to which we append our custom content. Somehow the pageDiv suddenly returned “undefined”.
    Steps in our script:

    -          Retrieve pageDiv, with success: pageDiv is found.

    -          Further down in the script: pageDiv suddenly is “undefined”

    -          Solution: retrieve the pageDiv element again later on in the script.

    Seems like scripts are loaded in a different order, variables get overwritten…? (maybe scripts get loaded twice)“

    So we adjusted our js-scripts to work after the patch, but now get a different error. A lot to take in ;)
  • avanneer9353
    avanneer9353 Community Member Posts: 10
    I now fixed the problem by using a variable. At the end of each section the variable for that specific section is set equal to 1. The imageDone is shown based on that variable being equal to 1. Strangely, this condition does work.

    For now the problem in this course is fixed, however it is still a problem..
  • agaudet1236
    agaudet1236 Community Member Posts: 36
    Good to see that you found a workaround of some sort. I just got forwarded the issue through support also so i'll definitely take a look at the title once they receive  it. Thanks for the additional info , I'm sure it will help!
  • avanneer9353
    avanneer9353 Community Member Posts: 10
    Hi Andrew,

    Thanks for the reply and sorry for my late reaction. The workaround made solving the error a little less urgent and I was able to focus on developing further. I just uploaded a pkg-file as instructed in the e-mail I got from support. It's not the course I was working on but a small version with the same issue. I hope you are able to take a look at it, because the workaround was helpful in fixing the loop, but the error is now messing up my actions for modifying the AICC score. I placed a note in the course with a little explanation.

    Thanks and good luck :)
Sign In or Register to comment.

So You Wanna Be An eLearning ROCKSTAR?

We're all fans of eLearning here! Want to become an eLearning ROCKSTAR? Just click on one of the buttons below to start your rocking journey!