Copied to clipboard

Flag this post as spam?

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


  • Gunnar Már Óttarsson 11 posts 48 karma points
    Jul 22, 2020 @ 11:27
    Gunnar Már Óttarsson
    0

    Scope usage in u8

    We've been running into a rather nasty scope related issue, one that only comes up intermittently and can be quite difficult to reproduce.

    In our case we where communicating with an azure sql database, had a IUserComposer with a database query to cmsDictionary and cmsLanguageText and a later component then used IContentService GetRootContent.

    At that point we would get a NullReferenceException on the instance of UmbracoDatabase and it's property Transaction when Umbraco 8 core attempted to access that property inside SqlServerSyntaxProvider's ReadLock()

    We first attempted a fix using autoComplete: true as a parameter of CreateScope() however unbeknownst to us that scope apparently was a nested scope as that had no effect. Manually completing these cmsDictionary and cmsLanguageText however ended up doing the trick.

    Likely this situation was a combination of factors since i was unable to reproduce it in a fresh project with similar code unless i ended up copying the binary folder over....

    We did try out building Umbraco locally and using 8.6.4 since it mentioned azure fixes but that did not help.

Please Sign in or register to post replies

Write your reply to:

Draft