Copied to clipboard

Flag this post as spam?

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


  • Moran 285 posts 934 karma points
    Jun 26, 2015 @ 08:34
    Moran
    0

    Error loading MacroEngine script

    Hi After upgrading from 7.2.1 to 7.2.2 I get the following error message: Error loading MacroEngine script (file: /Seo/seoMeta.cshtml)

    This is what I got in the log file:

    2015-06-26 11:28:24,558 [53] WARN umbraco.macro - [Thread 37] Error loading MacroEngine script (file: /Seo/seoMeta.cshtml, Type: ''. Exception: System.Web.HttpCompileException (0x80004005): c:\Users\Moran\AppData\Local\Temp\Temporary ASP.NET Files\vs\cabe8853\4fc012e9\AppWebseometa.cshtml.419e6d2b.ja7uqwyk.0.cs(24): error CS0234: The type or namespace name 'Helpers' does not exist in the namespace 'Microsoft.Web' (are you missing an assembly reference?)

    What is this namespace?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Jun 29, 2015 @ 22:05
    Alex Skrypnyk
    0

    Hi Moran,

    Can you show code of your razor view ?

    THanks, Alex

  • Moran 285 posts 934 karma points
    Jun 30, 2015 @ 05:39
    Moran
    0

    Sure this is my code, It worked fine until I upgraded from 7.2.1 to 7.2.2 It's also happen to every other razor macro that I have.

    @using System.Text.RegularExpressions
    @using umbraco.MacroEngines
    @inherits umbraco.MacroEngines.DynamicNodeContext
    
    @{
        DynamicNode d = new DynamicNode(Model.Id);
        string keywords = string.Empty;
        string desc = string.Empty;
        string canonical = string.Empty;
        string robots = string.Empty;
    
        keywords = String.IsNullOrEmpty(d.GetPropertyValue("metaKeywords")) ? string.Empty : d.GetPropertyValue("metaKeywords"); 
        desc = String.IsNullOrEmpty(d.GetPropertyValue("metaDescription")) ? string.Empty : d.GetPropertyValue("metaDescription");
        canonical = String.IsNullOrEmpty(d.GetPropertyValue("canonicalTag")) ? string.Empty : d.GetPropertyValue("canonicalTag");
        robots = String.IsNullOrEmpty(d.GetPropertyValue("metaRobot")) ? "index,follow" : d.GetPropertyValue("metaRobot");
    
        if (!String.IsNullOrEmpty(keywords))
        {
            <meta name="keywords" content="@keywords" />
        }
        if (!String.IsNullOrEmpty(desc))
        {
            <meta name="description" content="@desc" />
        }
        if (!String.IsNullOrEmpty(canonical))
        {
            <link rel="canonical" href="@canonical"/> 
        }
        if (!String.IsNullOrEmpty(robots))
        {
            <meta name="robots" content="@robots" />
        }
    }
    
  • Chris 13 posts 53 karma points
    Jul 09, 2015 @ 03:49
    Chris
    100

    Try installing the nuget package Microsoft-Web-Helpers

    Answer found here

  • Moran 285 posts 934 karma points
    Jul 09, 2015 @ 08:42
    Moran
    0

    Hi I already tried that and it didn't work. :)

  • Moran 285 posts 934 karma points
    Jul 13, 2015 @ 09:43
    Moran
    0

    Thanks That solved the issue, I previously installed a different package.

Please Sign in or register to post replies

Write your reply to:

Draft