Copied to clipboard

Flag this post as spam?

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


  • Developer 22 posts 123 karma points
    Feb 15, 2018 @ 11:57
    Developer
    0

    Issue with Umbraco Service - "Nullable object must have value"

    Hi,

    We're implementing different Umbraco service using ApplicationContext to pull data from Umbraco backend. It always give null in return or gives exception of "Nullable object must have value" while calling the service method itself. This is might because of NULL in nodeUser column in umbracoNode table. If I update 0 in Database, my service runs fine. But it again sets nodeUser to NULL if I perform save in umbraco backend.

    Here is my code :

    var contentService = ApplicationContext.Current.Services.ContentService;

    var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;

    var contentType = contentTypeService.GetContentType("blog");

    var contents = contentService.GetContentOfContentType(contentType.Id);

    enter image description here

    Can anyone help me to get out of this??

    Thanks in advance.

  • Developer 22 posts 123 karma points
    Nov 06, 2019 @ 10:10
    Developer
    0

    Upgrading the version of UmbracoCms.Core to the latest resolved the problem!!

Please Sign in or register to post replies

Write your reply to:

Draft