Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 20, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 20, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 20, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 20, 2025

      GPT-5 should have a higher “degree of scientific certainty” than the current ChatGPT — but with less model switching

      May 20, 2025

      Elon Musk’s Grok 3 AI coming to Azure proves Satya Nadella’s allegiance isn’t to OpenAI, but to maximizing Microsoft’s profit gains by heeding consumer demands

      May 20, 2025

      One of the most promising open-world RPGs in years is releasing next week on Xbox and PC

      May 20, 2025

      NVIDIA’s latest driver fixes some big issues with DOOM: The Dark Ages

      May 20, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Community News: Latest PECL Releases (05.20.2025)

      May 20, 2025
      Recent

      Community News: Latest PECL Releases (05.20.2025)

      May 20, 2025

      Getting Started with Personalization in Sitecore XM Cloud: Enable, Extend, and Execute

      May 20, 2025

      Universal Design and Global Accessibility Awareness Day (GAAD)

      May 20, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      GPT-5 should have a higher “degree of scientific certainty” than the current ChatGPT — but with less model switching

      May 20, 2025
      Recent

      GPT-5 should have a higher “degree of scientific certainty” than the current ChatGPT — but with less model switching

      May 20, 2025

      Elon Musk’s Grok 3 AI coming to Azure proves Satya Nadella’s allegiance isn’t to OpenAI, but to maximizing Microsoft’s profit gains by heeding consumer demands

      May 20, 2025

      One of the most promising open-world RPGs in years is releasing next week on Xbox and PC

      May 20, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Bug Fixing: Lazy loaded property value is not supported by the current property instance

    Bug Fixing: Lazy loaded property value is not supported by the current property instance

    July 30, 2024

    While upgrading from CMS v11 to v12, we ran into an error that read “Lazy loaded property value is not supported by the current property instance”. Unfortunately, the stack trace didn’t really say what the problem was. Here is that stack trace:

    System.InvalidOperationException: Lazy loaded property value is not supported by the current property instance
    at EPiServer.DataAccess.Internal.LazyPropertyValueLoader.SetValue(PropertyData property, PropertyDataRecord dataRecord, Func`3 valueConverter)
    at EPiServer.DataAccess.Internal.ContentDB.ReadPropertyData(PropertyData prop, DbDataReader reader, ContentReference contentLink, CultureInfo language)
    at EPiServer.DataAccess.Internal.ContentListDB.ReadCustomProperties(DbDataReader reader, Dictionary`2 allFetchedItems, Boolean isReadingVersions)
    at EPiServer.DataAccess.Internal.ContentListDB.ReadPublishedList(DbCommand cmd)
    at EPiServer.Data.Providers.Internal.SqlDatabaseExecutor.<>c__DisplayClass26_0`1.<Execute>b__0()
    at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
    at EPiServer.DataAccess.Internal.ContentListDB.LoadSpecificContentInstances(IList`1 contentLinks, Int32 languageBranchID)
    at EPiServer.Core.Internal.DefaultContentProvider.BatchLoad(IList`1 contentLinks, Func`2 dbLoader)
    at EPiServer.Core.Internal.DefaultContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
    at EPiServer.Core.ContentProvider.GetContentBatch(IList`1 batch, ILanguageSelector selector, List`1& contents, Dictionary`2& contentMap)
    at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
    at EPiServer.Core.Internal.ProviderPipelineImplementation.GetItems(ContentProvider provider, IList`1 contentLinks, LoaderOptions loaderOptions)
    at EPiServer.Core.Internal.DefaultContentLoader.GetChildren[T](ContentReference contentLink, LoaderOptions loaderOptions, Int32 startIndex, Int32 maxRows)
    at EPiServer.Core.Internal.DefaultContentLoader.GetChildren[T](ContentReference contentLink, LoaderOptions loaderOptions)
    at MyProject.Business.Settings.SettingsService.UpdateSettings() in C:sourcecodeMyProject.cmssrcMyProject.BusinessServicesSettingsService.cs:line 185
    at MyProject.Business.Settings.SettingsService.RegisterContentRoots() in C:sourcecodeMyProject.cmssrcMyProject.BusinessServicesSettingsService.cs:line 208
    at MyProject.Business.Settings.SettingsService.InitializeSettings() in C:sourcecodeMyProject.cmssrcMyProject.BusinessServicesSettingsService.cs:line 142
    at MyProject.Web.Middleware.Initialization.ApplicationBuilderExtensions.InitializeSettings(IApplicationBuilder app) in C:sourcecodeMyProject.cmssrcMyProject.WebMiddlewareInitializationApplicationBuilderExtensions.cs:line 105
    at MyProject.Web.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in C:sourcecodeMyProject.cmssrcMyProject.WebStartup.cs:line 146
    at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
    at Microsoft.AspNetCore.Hosting.ConfigureBuilder.<>c__DisplayClass4_0.<Build>b__0(IApplicationBuilder builder)
    at Microsoft.AspNetCore.Hosting.GenericWebHostBuilder.<>c__DisplayClass15_0.<UseStartup>b__1(IApplicationBuilder app)
    at EPiServer.Forms.Samples.FormsSamplePublicStaticFileStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
    at EPiServer.Forms.FormsPublicStaticFileStartupFilter.<>c__DisplayClass1_0.<Configure>b__0(IApplicationBuilder app)
    at EPiServer.GoogleAnalytics.GoogleAnalyticsStaticFileStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
    at Microsoft.AspNetCore.Mvc.Filters.MiddlewareFilterBuilderStartupFilter.<>c__DisplayClass0_0.<Configure>g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
    at Microsoft.AspNetCore.HostFilteringStartupFilter.<>c__DisplayClass0_0.<Configure>b__0(IApplicationBuilder app)
    at Microsoft.AspNetCore.Hosting.GenericWebHostService.<StartAsync>d__37.MoveNext()

    Fixing the Problem

    Optimizely CMS – the Importance of GUIDs and Assembly Names

    A colleague found that when upgrading from v11 to v12, PropertyLists were crashing with little to no error messages. The solution was to convert all instances of [PropertyDefinitionTypePlugIn] to include a GUID parameter before converting the database. Making this change and then loading the v11 site will update the database with the new GUID.

    Checking the Database

    I thought that’s what I had done, but I still had this error, so I checked the debug console and found a line that read:

    “Unable to create a PropertyData instance of Type: ‘MyProject.Data.Models.PoC.KeyValueItemProperty’ Assembly: ‘MyProject.Data’. Will fallback using the data type instead.”

    That KeyValueItemProperty was one of the PropertyLists to which we added a GUID, so I looked in the database.

    SELECT *
    FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
    WHERE Name like ‘%KeyValueItemProperty%’

    Sure enough, there were now two rows for KeyValueItemProperty in that table. One of them had the GUID and the older one did not.

    pkID Property Name GUID TypeName AssemblyName fkContentTypeGUID DisplayName GroupName Hidden
    1000 13 KeyValueItemProperty NULL MyProject.Data.Models.Properties.KeyValueItemProperty MyProject.Data NULL NULL NULL 0
    1223 13 KeyValueItemProperty E05C9EF6-E538-489E-AAF4-206EB431E41B MyProject.Data.Models.Properties.KeyValueItemProperty MyProject.Data NULL NULL NULL 0

    I ran a quick UPDATE command to add the GUID to the older row, presumably the one with associated content, like this:

    UPDATE [MyDatabase].[dbo].[tblPropertyDefinitionType]
    SET [GUID] = (SELECT [GUID] FROM [MyDatabase].[dbo].[tblPropertyDefinitionType] WHERE pkID = 1223)
    WHERE pkID = 1000

    To keep the database clean, I removed the duplicate row:

    DELETE
    FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
    WHERE pkID = 1223

    I tried launching the site, and another PropertyList threw an error like KeyValueItemProperty. I repeated the same SQL queries to update the database with the GUID. Once I did that, the site launched cleanly.

    To be sure that I had corrected all duplicate rows, I ran the following query and found a few more PropertyLists. These apparently didn’t have content associated with them, yet, so they didn’t throw an error.

    SELECT *
    FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
    WHERE Name IN (
    SELECT Name
    FROM [MyDatabase].[dbo].[tblPropertyDefinitionType]
    GROUP BY Name
    HAVING COUNT(Name) > 1)

    I ran the same SQL queries to clean those up, and now I have a working site. Visual Studio no longer throws errors about a lazy loaded property value not being supported.

    Note: We’re running EPiServer.CMS version 12.27.1.

    Please share your insight into my solution to this problem–whether it works or doesn’t, or if there’s something I missed. The previous forum posts regarding this error were from pre-2018 and recommended adding a setting to web.config. I found one post that said adding that setting didn’t resolve the issue anymore.

    Source: Read More 

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleBuild SSH Apps with PHP and Laravel Prompts
    Next Article Porffor: A from-scratch ahead-of-time JS engine

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 20, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-4996 – Intelbras RF 301K Cross-Site Scripting Vulnerability

    May 20, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Thoughts After 15 Years Spent In UX Design

    Development

    What is RAID Array? RAID 0, 1, 5, 6, and 10

    Linux

    CVE-2025-47577 – TemplateInvaders TI WooCommerce Wishlist Unrestricted File Upload Remote Code Execution

    Common Vulnerabilities and Exposures (CVEs)

    Laravel Debounce

    Development
    Hostinger

    Highlights

    News & Updates

    Editor’s Soapbox: Ticking Toks and Expertise

    January 21, 2025

    Knowing the kinds of readers we have here, I strongly suspect that if you drew…

    MIT researchers introduce generative AI for databases

    July 8, 2024

    Tech-loving Brits shouldn’t wait for Prime Day — this is the ONLY thing worth buying now that makes summer working bearable

    June 24, 2024

    I turned my Windows PC into an EdgeBook — Microsoft’s web apps were the most glaring issue

    April 22, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.