Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Aileen Jen 3 posts 75 karma points
    Oct 08, 2020 @ 14:29
    Aileen Jen
    0

    Unable to preview content - LazyLoad is not defined

    We just upgraded Umbraco from v8.5.2 to v8.8.0. When our content editor tried to preview content, a blank page is displayed, with the dark blue "Preview Mode" bar at the bottom.

    enter image description here

    Using the browser's Developer Tools, we are seeing this error message in the console:

    Loading failed for the <script> with source “https://<app-service-name>.azurewebsites.net/lib/lazyload-js/lazyload.min.js”.
    
    Uncaught ReferenceError: LazyLoad is not defined
            <anonymous> https://<app-service-name>.azurewebsites.net/umbraco/preview/Application?umb__rnd=e3cd6ffff646fe48fcc7464d7a060957:1
    

    When we checked the Network tab in the browser's Developer Tools, we see a 404 for https://app-service-name.azurewebsites.net/lib/lazyload-js/lazyload.min.js

    Any help would be appreciated.

  • Aileen Jen 3 posts 75 karma points
    Oct 29, 2020 @ 20:50
    Aileen Jen
    0

    I was able to solve this issue by the solution suggested in this post.

    I had to add a new condition to the rewrite rule that removes trailing slash to exclude "/umbraco".

    <add input="{REQUEST_URI}" pattern="^/umbraco" negate="true" ignoreCase="true" />
    

    The complete solution I used is below:

    <rules>
      <rule name="Remove trailing slash" stopProcessing="true">
        <match url="(.*)/$" />
        <conditions>
          <add input="{REQUEST_URI}" pattern="^/umbraco" negate="true" ignoreCase="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        </conditions>
        <action type="Redirect" redirectType="Permanent" url="{R:1}" />
      </rule>
    </rules>
    
Please Sign in or register to post replies

Write your reply to:

Draft