Copied to clipboard

Flag this post as spam?

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


  • Nicolas 23 posts 104 karma points
    Mar 06, 2015 @ 12:25
    Nicolas
    0

    Error loading MacroScriptEngine after update from 4.10.11 to 6.0.6

    Hey there Umbraco Community

    So I'm a Newbye in Umbraco and have some Seriouse Issues. I got to Update an Existing Website on Umbraco v 4.10.8 up to v7.2 The update to 4.10.11 went smooth with some troubles i could fix myself. But now with the upgrade to 6.0.6 i have a problem i cant fix... The website is working perfectly fine except two macros (Can be taken as one because german/French version). on the website i get the error Error loading MacroEngine script (file:).

    Nothing special with that.. had similar errors befor but fixing was easy.

    now the tracelog gives me the following statement:

    2015-03-06 11:57:56,893 [145] WARN  umbraco.macro - <log4net.Error>Exception during StringFormat: the Inputstring has wrong format. <format>[Thread 114] Error loading MacroEngine script (file: ******.cshtml, Type: ''. Exception: System.Web.HttpCompileException (0x80004005): c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1c3f1f49\2ad3ae7f\App_Web_******.cshtml.70df5e80.cwl8fkfv.0.cs(1535): error CS1513: } erwartet.
    

    at System.Web.Compilation.AssemblyBuilder.Compile()

    at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()

    at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)

    at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

    at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

    at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)

    at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)

    at System.Web.WebPages.BuildManagerWrapper.CreateInstanceOfType[T](String virtualPath)

    at System.Web.WebPages.VirtualPathFactoryManager.CreateInstanceOfType[T](String virtualPath)

    at System.Web.WebPages.WebPageBase.CreateInstanceFromVirtualPath(String virtualPath, IVirtualPathFactory virtualPathFactory)

    at umbraco.MacroEngines.RazorMacroEngine.ExecuteRazor(MacroModel macro, INode currentPage)

    at umbraco.MacroEngines.RazorMacroEngine.Execute(MacroModel macro, INode currentPage)

    at umbraco.macro.loadMacroScript(MacroModel macro)

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

    if i get this right, the autogenerated File has some errors... where might this errors come from?

    if i enter a different Script in the Umbraco Environment it works Perfectly fine but this one Script won't work... is there an error in the script itself?

    Greets Nicolas

  • Lars-Erik Aabech 350 posts 1102 karma points MVP 8x c-trib
    Mar 06, 2015 @ 12:29
    Lars-Erik Aabech
    0

    Hi Nicolas,

    This is a subforum for a plugin used for editing relations.
    You'll have better luck getting answers in the core Umbraco forums.
    https://our.umbraco.org/forum/getting-started/installing-umbraco

    However, the exception you're getting is almost certainly due to some date being parsed with invalid culture. ;)

    Lars-Erik

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 06, 2015 @ 12:38
    Jan Skovgaard
    0

    Hi Nicolas and welcome to our :)

    I just moved this post into the installing forum - I'm going to delete the other post since that will just cause confusion.

    But soon a new version our will be released and then the categories are going to be less important since things will be based on tagging. HQ tried deploying the new version this week but had to roll back to this old version for now. Hope they will have another look at it soon since there is going to be so much nice stuff with the update.

    Ok, that was off topic - Sorry - Hopefully someone can help you past this error.

    /Jan

  • Nicolas 23 posts 104 karma points
    Mar 06, 2015 @ 13:13
    Nicolas
    0

    Hoops^^ thanks for moving it :)

    hopefully i will get help here..

  • Nicolas 23 posts 104 karma points
    Mar 06, 2015 @ 16:22
    Nicolas
    0

    Soooo i was able to fix it with a little help from a Friend. The error was caused in the script.

    The script had several mistakes using the @ indicator:

    @foreach(somethinginhere)
    {
        @object.attribute
    }
    

    (Second @ causes an error with {} that are Missing)

    in Razor v1.0.0 this was no problem and it worked somehow but in Razor v2.0.0 this caused massive errors...

    i now have to check every script (about 30) for errors of that kind... once again it got proofed that writing code correctly from the beginning can save further trouble for the next one who has to work with it^^

    Stay tuned and keep up the good work :)

    Greets Nicolas

  • Nicolas 23 posts 104 karma points
    Mar 06, 2015 @ 16:23
    Nicolas
    101

    Soooo i was able to fix it with a little help from a Friend. The error was caused in the script.

    The script had several mistakes using the @ indicator:

    @foreach(somethinginhere)
    {
        @object.attribute
    }
    

    (Second @ is incorrect and causes an error with {} that are Missing)

    in Razor v1.0.0 this was no problem and it worked somehow but in Razor v2.0.0 this caused massive errors...

    i now have to check every script (about 30) for errors of that kind... once again it got proofed that writing code correctly from the beginning can save further trouble for the next one who has to work with it^^

    Stay tuned and keep up the good work :)

    Greets Nicolas

  • Sören Deger 733 posts 2844 karma points c-trib
    Mar 06, 2015 @ 16:30
    Sören Deger
    0

    Hi Nicolas,

    The razor syntax is much stricter in v2.0.0.

    Glad that you could solve it and thank you for sharing the solution :)


    Best,

    Sören

  • Nicolas 23 posts 104 karma points
    Mar 06, 2015 @ 16:39
    Nicolas
    0

    Hi Sören Yeah that's what i thought afterwards... The double @ was tolerated in v1.0.0 but is not in v2.0.0

    Thought i'd share it with the community so if anyone got the same issue, he (or she) doesn't have to much time on that simple to solve but hard to figure out issue like me... (i nearly went insane... more and more errors but no solution in sight for roughly 3 days...)

    the hard thing about it was, that the error given in the tracelog doesn't have a direct link to the error... i was always searching for the "String.Format" error and where the wrong format might be...

    all caused by some @'s that were to much in the script...

    Greets Nicolas

Please Sign in or register to post replies

Write your reply to:

Draft