Errors in Razor after upgrade from 2.0 to 3.0 and MVC3 to MVC 5
Upgraded from version 4 to 7.3.1 successfully but some macros not working
Here is debug trace
umbracoMacro Executing Macro Script (file: Left Side Menu) 7.150103 0.000010
umbracoMacro Error Loading Razor Script (file: Left Side Menu) 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Items' at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at ASP._Page_macroScripts_LeftSideMenu_cshtml.Execute() in \macroScripts\LeftSideMenu.cshtml:line 6
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors)
at System.Web.WebPages.WebPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer)
at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)
at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)
Looks like Razor script error after upgrading to latest version of MVC.
Do you have any idea on how to fix this 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Items' at CallSite.Target(Closure , CallSite , Object
That script file working fine with older version of Razor but not with the newer version
I have talked to one from the core team, and we have not seen this issue before. We would like to see if we can replicate it to see what the issue might be.
Could you please provide us the exact steps that you have taken, so we can try replicate it on a clean version of 7.3.x
Errors in Razor after upgrade from 2.0 to 3.0 and MVC3 to MVC 5
Upgraded from version 4 to 7.3.1 successfully but some macros not working
Here is debug trace
Looks like Razor script error after upgrading to latest version of MVC.
Please let me know if anyone knows how to fix it.
Thanks, Lokesh
Hi Lolesh,
Try to see this issue from the issue tracker http://issues.umbraco.org/issue/U4-3560
Umbrage 7 donĀ“t support officially MVC 5 due to breaking changes and current incompatibility with Examine.
However since 7.2.2 you CAN upgrade to MVC5 using Microsoft's upgrade guidelines: http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2
Hope this helps,
/Dennis
Hi Dennis,
Thanks for your quick response
But from version 7.3.0 MVC5 is default as per this issue tracker http://issues.umbraco.org/issue/U4-6903
Thanks, Lokesh
Hi Lokesh,
Oh my bad, I totally forgot this sorry for that.
/Dennis
Hi Dennis,
Do you have any idea on how to fix this 'umbraco.MacroEngines.DynamicXml' does not contain a definition for 'Items' at CallSite.Target(Closure , CallSite , Object
That script file working fine with older version of Razor but not with the newer version
Please let me know
Thanks, Lokesh
Hi Lokesh,
I have talked to one from the core team, and we have not seen this issue before. We would like to see if we can replicate it to see what the issue might be.
Could you please provide us the exact steps that you have taken, so we can try replicate it on a clean version of 7.3.x
/Dennis
Hi Dennis,
I have upgraded website from 4.11.8 to 7.3.1, then fixed some razor issues.
As the Razor parser of MVC5 is different from MVC3. Razor v3 is having advanced parser features and on the other hand strict parsing compare to MVC3.
I ran into syntax errors in view while converting MVC3 to MVC5 as we have not used razor syntax in correct manner.
I fixed some issues by avoiding server blocks in views unless there is variable declaration section.
And also by avoiding @ when you are already in server scope.
I don't know why this script is not working
Thanks and Regards, Lokesh
After digging in to code, i found that @Model.NodeById is obsolete, and i need to use @Library.NodesById"
Thanks Dannis for your help
Hi Lokesh / Dennis,
This issue comes when we upgrade from version 6 to 7.
umbraco 6 uses the custom data type created by uComponent which is deprecated in version higher than 7.
Just replace the respective picker with MultiNode Tree picker in Umbraco 7 , that will help in resolving the issue.
Just create new data type with Multinode Tree Picker and use it to replace with the existing content property.
Dynamic Xml will be converted to DynamicNodeList and your life is easy :)
Thanks , let me know for any further queries. i have successfully upgraded version 6 to 7 of very Huge banking site.
Regards, Arjun Singh
is working on a reply...