Hardy seems like you are actually calling a macros with ID= "Macro1", can you try this instead assuming you are making use of inline razor in templates
Fuji -- I tried, with or without the ID=..." I got same error, however it works in 4.9.0 well.
Stephen -- My macro is just one line of code as you have seen in the post, the error is not caused by <umbraco:Item field="content" runat="server" />, I removed it and got same error.
James - I don't have cshtml included in that key and inline razor works fine.
Hardy - strange. I've just tried your exact code and it works perfectly. Must be something else going on in your environment. Definitely isn't a breaking change from the upgrade, at least not around inline razor, as far as I can see.
Inline Razor Stopped Working in 4.11.0?
I have a fresh installation of 4.11.0, and I created a test master page like
<%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>
<asp:Content ContentPlaceHolderID="ContentPlaceHolderDefault" runat="server">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head></head>
<body>
<umbraco:Item field="content" runat="server" />
<br />
<umbraco:Macro ID="Macro1" runat="server" Language="cshtml">
@System.Threading.Thread.CurrentThread.CurrentCulture.Name
</umbraco:Macro>
</body>
</html>
</asp:Content>
Here I have a piece of inline Razor script. It works well in 4.9.0. But when I load a page with this master template I got an error message
Error loading MacroEngine script (file: )
Any clue is it a broken change?
Hardy seems like you are actually calling a macros with ID= "Macro1", can you try this instead assuming you are making use of inline razor in templates
//fuji
Can we see the Macro? I know there has been a change in the way you access the properties on your page...
@Html.Raw(Model.Content.GetPropertyValue("bodyText"))
has become
@Html.Raw(Model.Content.GetPropertyValue<string>("bodyText"))
Regards,
S
Fuji -- I tried, with or without the ID=..." I got same error, however it works in 4.9.0 well.
Stephen -- My macro is just one line of code as you have seen in the post, the error is not caused by <umbraco:Item field="content" runat="server" />, I removed it and got same error.
Have you change umbracoSettings.config?
<scriptFileTypes>js,xml,cshtml</scriptFileTypes>
Fuji - you're confusing ID with Alias.
James - I don't have cshtml included in that key and inline razor works fine.
Hardy - strange. I've just tried your exact code and it works perfectly. Must be something else going on in your environment. Definitely isn't a breaking change from the upgrade, at least not around inline razor, as far as I can see.
Mine as well is working just fine.
Just ran in to the GetPropertyValue issue. Just wondering for future reference WHERE are breaking changes like this documented.
It's pretty major to release what's called a small patch that then blows up nearly all your razor views and macros..
I'd like to know for future reference so i can keep up with what's going on rather than hunting on the forum to find what may/may not have changed..
Cheers
Tom
is working on a reply...