Copied to clipboard

Flag this post as spam?

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


  • Matt Taylor 873 posts 2086 karma points
    May 17, 2013 @ 17:48
    Matt Taylor
    0

    ContentHelper.GetCurrentContent() causes an error

    I've seen this posted in the main uSiteBuilder forum but it's a problem with the Admin package.

    The version of the Vega.USiteBuilder.dll that gets installed with the latest package breaks ontentHelper.GetCurrentContent() in all my templates.

    You can't use the latest verion of the Vega.USiteBuilder.dllbecause that then breaks the Admin package.

  • Stephen 47 posts 270 karma points
    May 20, 2013 @ 10:54
    Stephen
    0

    Which version of the package and which version of Umbraco are you using? 

    What's the error?

  • Matt Taylor 873 posts 2086 karma points
    May 20, 2013 @ 11:08
    Matt Taylor
    0

    Hello Stephen,

    I'm using Umbraco v6.0.5.

    I originally installed uSiteBuilder v1.2 but have also downloaded the latest source and compiled that.

    I installed uSiteBuilderAdmin v2.1.1-beta which worked fine in the Umbraco UI but then I discovered that the it caused ContentHelper.GetCurrentContent() to stop working in my templates code.

    I restored the original version of the Vega.USiteBuilder.dll and normal service was restored by ContentHelper.GetCurrentContent() but the Admin package then just displayed an error.

    I then thought I'd compile the latest uSiteBuilder source and reference that DLL in the latest uSiteBuilderAdmin source and compile that. Unfortunately the uSiteBuilderAdmin fails to build with the latest uSiteBuilder assembly.

    That's where I've got to so far.

    Regards, Matt

  • Stephen 47 posts 270 karma points
    May 21, 2013 @ 09:45
    Stephen
    0

    I installed uSiteBuilderAdmin v2.1.1-beta which worked fine in the Umbraco UI but then I discovered that the it caused ContentHelper.GetCurrentContent() to stop working in my templates code.

    What was the problem with CurrentContent(), was there an error message? 

    I'm still using 4.11 for any new sites as I don't want to run into problems with incompatible packages etc, but I'll try to have a look at v6 today.

     

    Stephen

  • Matt Taylor 873 posts 2086 karma points
    May 21, 2013 @ 10:19
    Matt Taylor
    0

    Sorry, I misled. I think it's a problem with latest version of uSiteBuilder and Umbraco v6.

    It does not error but this.CurrentContent.Id will return 0.
    In fact I don't think any of the Umbraco node properties are set when trying to access them via this.CurrentContent.

    Custom properties for the doc type are accessible though.

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft