Macro rendering error in Rich Text Editor - GetMacroResultAsHtmlForEditor
I created a new data type to use as a parameter in my macro. It is a Rich Text Editor data type, so I can have text with a link in it. Here are my files:
@{
var div1Body = Model.MacroParameters["paragraph1"].ToString();
}
<div class="feature-body">
@Html.Raw(div1Body)
</div>
When I add this macro to a page using the Rich Text Editor, I get the following error message:
Request error: The URL returned a 404 (not found):
/umbraco/backoffice/UmbracoApi/Macro/GetMacroResultAsHtmlForEditor
The error seems to be related to putting a link in the RTE provided by the macro. If I remove the link, the macro renders correctly in the page RTE.
It still saves correctly and renders in the browser, but I'd like to eliminate the error in the back end if possible. I don't want my client to see error messages that might confuse him.
Looks like I spoke too soon when I said it renders correctly in the browser. The link I added to the text in the macro RTE is being returned as this:
{localLink:1169}
Is there a different way I should be getting the input from the macro RTE than @Html.Raw() that will cause the link URL to render correctly?
EDIT: I fixed this issue by using @Html.Raw(umbraco.template.ParseInternalLinks(div1Body)). But the rendering issue in the content RTE is still happening.
I had a redirect for all requests to html file paths on the frontend. This redirect was not selective enough and was also intercepting backoffice requests. Updating this redirect solved the problem.
Macro rendering error in Rich Text Editor - GetMacroResultAsHtmlForEditor
I created a new data type to use as a parameter in my macro. It is a Rich Text Editor data type, so I can have text with a link in it. Here are my files:
Text Editor HTML
Text Editor Controller
Package Manifest
Macro Partial (abridged
When I add this macro to a page using the Rich Text Editor, I get the following error message:
The error seems to be related to putting a link in the RTE provided by the macro. If I remove the link, the macro renders correctly in the page RTE.
It still saves correctly and renders in the browser, but I'd like to eliminate the error in the back end if possible. I don't want my client to see error messages that might confuse him.
Looks like I spoke too soon when I said it renders correctly in the browser. The link I added to the text in the macro RTE is being returned as this:
Is there a different way I should be getting the input from the macro RTE than @Html.Raw() that will cause the link URL to render correctly?
EDIT: I fixed this issue by using @Html.Raw(umbraco.template.ParseInternalLinks(div1Body)). But the rendering issue in the content RTE is still happening.
I've getting this error with all my macros for that past several months, even after updating to 7.4.1.
Is anyone else getting this? Again, it only happens in the backoffice RTE, not on the front-end.
Figured it out:
I had a redirect for all requests to html file paths on the frontend. This redirect was not selective enough and was also intercepting backoffice requests. Updating this redirect solved the problem.
is working on a reply...