Skip to main content
tuan.nguyen85
Participant
August 15, 2017
Answered

.html file shows blank

  • August 15, 2017
  • 4 replies
  • 5297 views

Hi,

I update the program yesterday to 2017.5 Release, build 16.5.1.104, and since then everything I publish displays a blank page, but the files I made before the update still working fine. I try to duplicate the old file and publish again with the new update, now it shows blank.

Is there any error with the new version of the program? I'm so confused, everything was working fine until this new update. When I inspected the html file in the browser it shows this error

abc.html:700 Uncaught ReferenceError: lib is not defined

    at dfpImages (abc.html:700)

    at onload (abc.html:717)

Does anyone know how to fix it?

    This topic has been closed for replies.
    Correct answer MarkB_Serco

    There has obviously been a change to the way "lib" is declared and scoped in the html5 output. I have been using my own javascript files added to the html page to add, control and remove instances from the library at runtime. After updating Animate CC to 2017.5 build 16.5.1.104, I was getting the same error of lib not defined. After clearing, my cache, republishing a new html5 page and generally pulling my hair out - as my code has been working just fine before the update, I started to look at where 'lib' was declared in the published html5 page.

    While I'm not sure where it was declared previously (I couldn't find that right off in my old files), I found it is now declared several times and no longer available at the root level of the DOM, but is scoped to the composition. In the HTML page, it is only declared locally to functions init() and handleComplete().

    However, if you are using frame scripts within Animate to instance a library object by its class name, it all works fine - as it's in the composition scope. So, 'lib' must be scoped to the composition somewhere. It just appears as it's not longer available to the html page itself.

    To get it to work with my external scripts, I changed 'lib' to be scoped to the page level (added it to the var list above the init function) and ensured it was only assigned once in the init() function. This might not be the best way, but all seems to be working fine for me now.

    4 replies

    UDESCO
    Adobe Employee
    Adobe Employee
    August 17, 2017

    'lib' is no longer directly accessible globally.

    You can something like below in frame scripts, to make it available for external access.

         document.lib = lib;

    Now you can access the lib via document.lib in external scripts.

    MarkB_SercoCorrect answer
    Participant
    August 16, 2017

    There has obviously been a change to the way "lib" is declared and scoped in the html5 output. I have been using my own javascript files added to the html page to add, control and remove instances from the library at runtime. After updating Animate CC to 2017.5 build 16.5.1.104, I was getting the same error of lib not defined. After clearing, my cache, republishing a new html5 page and generally pulling my hair out - as my code has been working just fine before the update, I started to look at where 'lib' was declared in the published html5 page.

    While I'm not sure where it was declared previously (I couldn't find that right off in my old files), I found it is now declared several times and no longer available at the root level of the DOM, but is scoped to the composition. In the HTML page, it is only declared locally to functions init() and handleComplete().

    However, if you are using frame scripts within Animate to instance a library object by its class name, it all works fine - as it's in the composition scope. So, 'lib' must be scoped to the composition somewhere. It just appears as it's not longer available to the html page itself.

    To get it to work with my external scripts, I changed 'lib' to be scoped to the page level (added it to the var list above the init function) and ensured it was only assigned once in the init() function. This might not be the best way, but all seems to be working fine for me now.

    Colin Holgate
    Inspiring
    August 15, 2017

    The HTML most likely has changed in the later version. If you have used custom HTML you would need to go into the templates are recreate whatever was custom. If you didn't do anything to the HTML template, then go into publish settings, advance tab, check the box to overwrite the HTML, and click the Use Default button if it's enabled.

    Legend
    August 15, 2017

    Clear your browser's cache.