A macro in the editor in 4.7 doesn't generate proper output
With Umbraco 4.7 I've put a macro in the editor (back-office) and it renders nicely in the editor, but when looking at the content on the actual website, there's no visible content.
When I take a look in the html source (on the actual website), this is what I get:
<?UMBRACO_MACRO macroAlias="Blah" />
The macro is actually a xslt file, and just to make sure that the xslt isn't the issue, right now it should just output a text, nothing else.
Do you render the content from the RTE field using umbraco:Item or using another XSLT file? If you're rendering it using another XSLT file you probably need to render it using the GetItem extension or perhaps RenderMacro.
I have found that hyphens or other punctuation in property aliases can prevent data-type controls from rendering when trying to create content. Also be sure that if you have imported a package that all the data types are still saving as the db-type you intented (that is, none have been switched from ntext to nvarchar or date, etc.)
I was once creating content in rich-text editors, then trying to insert that content in other rich text editors with macros. Long story short→You can't call a macro to display content that itself calls a macro. Something somewhere is going to be improperly escaped, and it can come out as <?UMBRACO_MACRO macroAlias="Blah" /> or similar on the actual delivered page.
I should say, you can't successfully call a macro which calls another macro using only insertions into content via the TinyMCE rich-text editor. You CAN call macros in your templates, which can have content that calls macros too. I think
A macro in the editor in 4.7 doesn't generate proper output
With Umbraco 4.7 I've put a macro in the editor (back-office) and it renders nicely in the editor, but when looking at the content on the actual website, there's no visible content.
When I take a look in the html source (on the actual website), this is what I get:
<?UMBRACO_MACRO macroAlias="Blah" />
The macro is actually a xslt file, and just to make sure that the xslt isn't the issue, right now it should just output a text, nothing else.
But still no output!
Any ideas?
Hi Steen
Do you render the content from the RTE field using umbraco:Item or using another XSLT file? If you're rendering it using another XSLT file you probably need to render it using the GetItem extension or perhaps RenderMacro.
Does this help?
/Jan
Hi Jan
Let's see what Mads thinks about your solution, hopefully it will fix his issue!
Thanks
Hi, working on the same case, and has just tested this through...
using umbraco.library:RenderMacroContent(), the output will show.
I've got a local copy of the same site, where rendering in the editor component fails... Any ideas here?
Steen original issue solved :-)
Hi Mads
Do you get any error messages? And what version is your local site running? Also 4.7?
/Jan
Hi,
No error messages, only the default message from all earlier versions
And all settings are right on the Macro etc... It's all synced directly from the working edition :-S
Version is also 4.7, as it is a mirrored setup.
--
Mads
Just a couple thoughts to toss in the mix.
I have found that hyphens or other punctuation in property aliases can prevent data-type controls from rendering when trying to create content. Also be sure that if you have imported a package that all the data types are still saving as the db-type you intented (that is, none have been switched from ntext to nvarchar or date, etc.)
I was once creating content in rich-text editors, then trying to insert that content in other rich text editors with macros. Long story short→You can't call a macro to display content that itself calls a macro. Something somewhere is going to be improperly escaped, and it can come out as <?UMBRACO_MACRO macroAlias="Blah" /> or similar on the actual delivered page.
I should say, you can't successfully call a macro which calls another macro using only insertions into content via the TinyMCE rich-text editor. You CAN call macros in your templates, which can have content that calls macros too. I think
is working on a reply...