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)
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.
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)
Hi Jeff,
Could you post the code from fileinfo.cshtml?
Thanks,
Jeavon
@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>
}
}
}
}
As I said it for the most part works in 2.10 but not 2.13
Strange, what picker is newsCategory?
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 )
Do you which line is 45 in your source code?
Hmm, Is this macro executed within GetSidebarNewsPicked.cshtml? What's in there?
That's the file Initially posted.
line 45 is the second line here:
var dynamicMultiNodeTreePicker = CurrentPage.newspicker;
foreach (var item in dynamicMultiNodeTreePicker.Where("Visible"))
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.
ok thanks for checking on this
I think I've solved it. Could you please try the latest v2.1.4 build? Latest build packages can be downloaded here.
Do I need to upgrade my Umbraco Install?
No, it's still built against v7.1.5. so anything above that is good.
It looks like its working now Jeavon, fantastic. Thank you very much for the fix. I'll keep you posted if the error resurfaces.
Awesome, I will publish v2.1.4 now then.
is working on a reply...