Copied to clipboard

Flag this post as spam?

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


  • jeff mayer 122 posts 200 karma points
    Dec 02, 2014 @ 18:07
    jeff mayer
    0

    V. 2.13 on U7.16 error

    Hello, when I upgrade to latest version of the Property Type converter (2.13) I get this error. Any suggestions? it seems to work with 2.10 but occasionally I need to restart server otherwise I get an error related to the converter

     

     

    2014-12-02 11:53:08,812 [23] WARN  umbraco.macro - [Thread 10] Error loading partial view macro (View: ~/Views/MacroPartials/Myfile.cshtml). Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Where'

     

    at CallSite.Target(Closure , CallSite , Object , String )

       at ASP._Page_Views_MacroPartials_GetSidebarNewsPicked_cshtml.Execute() in c:\inetpub\dev\dev-site.com\Views\MacroPartials\fileinfo.cshtml:line 45

       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()

       at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()

       at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)

       at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer)

       at Umbraco.Web.Mvc.ControllerExtensions.RenderViewResultAsString(ControllerBase controller, ViewResultBase viewResult)

       at Umbraco.Web.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content)

       at umbraco.macro.LoadPartialViewMacro(MacroModel macro)

       at umbraco.macro.renderMacro(Hashtable pageElements, Int32 pageId)

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 18:24
    Jeavon Leopold
    0

    Hi Jeff,

    Could you post the code from fileinfo.cshtml?

    Thanks,

    Jeavon

  • jeff mayer 122 posts 200 karma points
    Dec 02, 2014 @ 18:34
    jeff mayer
    0

    @inherits Umbraco.Web.Macros.PartialViewMacroPage

      

    @{

     

     var root = Umbraco.Content(1130);

     

    var nodes = root.Descendants("Newsitem");

     

    var selectedcategory = PageData[0]; 

        

     

    if(nodes.Any()){

     

     

     

    foreach(var node in nodes) 

     

    {

     

     

     

    @* Check if stories are assigned to *@

     

     

     

     

    if (node.HasValue("newsCategory")){

                                                        

                                                          

          foreach(var item in node.GetPropertyValue<string>("newsCategory").Split(','))  { 

     var category = item; 

     

        

     

     

     

    if ( category == selectedcategory){

     

     

     

     

     <p><a href="@node.Url"><i class="fa fa-chevron-circle-right"></i> @node.Name</a></p>

     

     

     <p class="truncatee articleintro">@Umbraco.Truncate(node.bodyText,155)</p> 

    <hr>    

     

    }

     

     

     

     

     

     

     

     

                                                                                      

     

     

     

    }

     

             

             

              

    }

       

       

  • jeff mayer 122 posts 200 karma points
    Dec 02, 2014 @ 18:36
    jeff mayer
    0

    As I said it for the most part works in 2.10 but not 2.13

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 18:54
    Jeavon Leopold
    0

    Strange, what picker is newsCategory?

  • jeff mayer 122 posts 200 karma points
    Dec 02, 2014 @ 19:48
    jeff mayer
    0

    Umbraco.DropDown

     

    I also get this error on another page with 2.13 : 

     

    CSharp.RuntimeBinder.RuntimeBinderException: 'object' does not contain a definition for 'Count'

       at CallSite.Target(Closure , CallSite , Object )



     

       

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 19:51
    Jeavon Leopold
    0

    Do you which line is 45 in your source code?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 19:55
    Jeavon Leopold
    0

    Hmm, Is this macro executed within GetSidebarNewsPicked.cshtml? What's in there?

  • jeff mayer 122 posts 200 karma points
    Dec 02, 2014 @ 20:08
    jeff mayer
    0

    That's the file Initially posted. 

    line 45 is the second line here: 

      var dynamicMultiNodeTreePicker = CurrentPage.newspicker;

        foreach (var item in dynamicMultiNodeTreePicker.Where("Visible"))

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 20:26
    Jeavon Leopold
    0

    Ah ok, think I might know what that is. I changed something in v2.1.3 for a core workaround. But actually that change should be able to be reverted for v7.1.9, I will check and come back to you.

  • jeff mayer 122 posts 200 karma points
    Dec 02, 2014 @ 20:39
    jeff mayer
    0

    ok thanks for checking on this

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 02, 2014 @ 23:15
    Jeavon Leopold
    1

    I think I've solved it. Could you please try the latest v2.1.4 build? Latest build packages can be downloaded here.

  • jeff mayer 122 posts 200 karma points
    Dec 03, 2014 @ 15:51
    jeff mayer
    0

    Do I need to upgrade my Umbraco Install?

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 03, 2014 @ 15:52
    Jeavon Leopold
    0

    No, it's still built against v7.1.5. so anything above that is good.

  • jeff mayer 122 posts 200 karma points
    Dec 03, 2014 @ 15:59
    jeff mayer
    0

    It looks like its working now Jeavon, fantastic. Thank you very much for the fix. I'll keep you posted if the error resurfaces. 

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 03, 2014 @ 16:09
    Jeavon Leopold
    0

    Awesome, I will publish v2.1.4 now then.

Please Sign in or register to post replies

Write your reply to:

Draft