Copied to clipboard

Flag this post as spam?

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


  • Michael L 24 posts 44 karma points
    Aug 15, 2013 @ 22:13
    Michael L
    0

    uHelpsyUmbracoHelper.Instance.TypedMedia(imageId) doesn't work on refresh

    works the first time the app is started up. or anytime it is restarted.

    After the first load, throws the ever so popular

    -----------

    Object reference not set to an instance of an object.

    at Umbraco.Web.UmbracoHelper.DocumentById(Int32 id, ContextualPublishedCache cache, Object ifNotFound) at Umbraco.Web.UmbracoHelper.TypedDocumentById(String id, ContextualPublishedCache cache) at Umbraco.Web.UmbracoHelper.TypedMedia(String id) at ASP._Page_Views_Partials_uBlogsy_Shared_uBlogsyShowImage_cshtml.Execute() in c:\Users\devbox\Documents\My Web Sites\www_WesV613\Views\Partials\uBlogsy\Shared\uBlogsyShowImage.cshtml:line 68

    ----------

     

    Guessing somethign to do with the singleton, after the intial load.

    having to use Umbraco.TypedMedia and avoid the singleton at this time.

  • Michael L 24 posts 44 karma points
    Aug 16, 2013 @ 15:35
    Michael L
    0

    Noticing more of this problem when using methods in the PostService.Instance that use .ToIPublishedContent.

     

    Loads fine the first time, then start throwing the "Object reference not set to an instance"  maybe something to do with the newest umbraco build?

  • Michael L 24 posts 44 karma points
    Aug 19, 2013 @ 22:48
    Michael L
    0

    Seems like something may have been changed in the helper singleton with the newest 6.1.4 nightly build.  Chaning the GetNode function to call the UmbracoContext.Current, instead of using the uHelpsyUmbracoHelper.

     publicclassIPublishedContentHelper

     

        {

            publicstaticIPublishedContentGetNode(intnodeId)

            {

                //return uHelpsyUmbracoHelper.Instance.TypedContent(nodeId);

                IPublishedContentipc=null;

                if (UmbracoContext.Current != null)

                {

                    varumbHalp=newUmbracoHelper(UmbracoContext.Current);

                    ipc=umbHalp.TypedContent(nodeId);

                }            return ipc;

     

            }

    .................

     

    }

  • Anthony Dang 1404 posts 2558 karma points MVP 3x c-trib
    Aug 27, 2013 @ 16:46
    Anthony Dang
    0

    If this is a bug with the nightly, could you please report it http://issues.umbraco.org/dashboard

     

Please Sign in or register to post replies

Write your reply to:

Draft