Umbraco v8.6.1 - Macros fail in RTE insert - even simplest
PROBLEM: Even the simplest macro, such as a stock snippet like "List child nodes" fails to render appropriately and instead renders "Macro alias: ListOfChildPages".
My template structure is...
My Macro structure is...
My Content Structure with Macro inserted is...
My Result rendered on the public web page...
Macro alias: ListOfChildPages
What am I doing wrong? This seems like it should be so simple.
The debug window shows all 200 except a 307 (temp redirect) from two font files. The console log shows no errors. Pretty sure the macro is not being executed.
Also, this happens with every macro I create on this new site. I worked my way back to using the stock snippet provided by umbraco to simplify as much as possible.
It appears that "Html.GetGridHtml" is not executing the macro as part of it's rendering. Does a new version fix this? Afraid to update this close to a launch.
Things I don't understand:
"Macro alias: ListOfChildPages" showing on the public page. This is normally consumed when interpreting a macro.
The macro will execute in the RTE editor if I turn that (2nd checkbox) "Render in ..." on. It will show up as the static output of the macro from my one last backoffice publish (i.e. not live executed, but executed back at publish time).
I can find posts going back to v4 on how this is a problem. Is this a systemic problem that can't be solved? Somebody come out and say that if it is because I've burned much time already on this.
Essentially you are expected to insert Macros into a Rich Text Area OR the Grid (using a Macro Grid Editor) - but not necessarily inside a Rich Text Area that is inside the grid!
So the workaround, would be for your grid cell to enable Macros to be inserted in the grid editor config, for the particular cell.
And then in the editor, insert a Rich Text Area for any text to appear 'above the macro' then add a Macro editor - pick your macro - then add a further Rich Text Area, for any text that needs to appear below the Macro.
I didn't understand your answer at first, but I think this is what you described in your solution. Correct?
Check out the screen shot below. I went in and configured my "columns" in my "grid editor" to allow "Macros" instead of just "Rich Text Editor" and "Head Line" as they were defaulted to. As a result, the human editor can now have an 1) RTE, followed by 2) a "macro" followed by 3) RTE/Macro/Whatever! #OutOfBox
Thanks Marc Goodson for your help! Hope this helps someone else.
I think it may depend on what the macro does. I have created simple html macro's that render ok in an RTE in the grid, however macro's with code I have not had any success in the rte
Ya, it's not with the macro contents. The macro is not even executing. I need an Umbraco v8 version of "umbraco.library:RenderMacroContent()". Does anybody know what that is?
OK, I haven't worked extensively with Umbraco sense like v4.7. I still had "old thinking" going on and was tunnel-vision on "insert macro through RTE" solution. Turns out I solved it differently.
Check out the screen shot below. I went in and configured my "columns" in my "grid editor" to allow "Macros" instead of just "Rich Text Editor" and "Head Line" as they were defaulted to. As a result, the human editor can now have an 1) RTE, followed by 2) a "macro" followed by 3) RTE/Macro/Whatever! #OutOfBox
Thanks everyone for your help! Hope this helps someone else.
Umbraco v8.6.1 - Macros fail in RTE insert - even simplest
PROBLEM: Even the simplest macro, such as a stock snippet like "List child nodes" fails to render appropriately and instead renders "Macro alias: ListOfChildPages".
My template structure is... My Macro structure is... My Content Structure with Macro inserted is...
My Result rendered on the public web page... Macro alias: ListOfChildPages
What am I doing wrong? This seems like it should be so simple.
Have you looked at it with your browser debug window open? it is possible that you are getting a 500 error from your macro but it is being hidden.
The debug window shows all 200 except a 307 (temp redirect) from two font files. The console log shows no errors. Pretty sure the macro is not being executed.
Also, this happens with every macro I create on this new site. I worked my way back to using the stock snippet provided by umbraco to simplify as much as possible.
It appears that "Html.GetGridHtml" is not executing the macro as part of it's rendering. Does a new version fix this? Afraid to update this close to a launch.
Things I don't understand:
Hi James
I think this issue goes 'way back'
https://issues.umbraco.org/issue/U4-6206
Essentially you are expected to insert Macros into a Rich Text Area OR the Grid (using a Macro Grid Editor) - but not necessarily inside a Rich Text Area that is inside the grid!
So the workaround, would be for your grid cell to enable Macros to be inserted in the grid editor config, for the particular cell.
And then in the editor, insert a Rich Text Area for any text to appear 'above the macro' then add a Macro editor - pick your macro - then add a further Rich Text Area, for any text that needs to appear below the Macro.
regards
Marc
I didn't understand your answer at first, but I think this is what you described in your solution. Correct?
Check out the screen shot below. I went in and configured my "columns" in my "grid editor" to allow "Macros" instead of just "Rich Text Editor" and "Head Line" as they were defaulted to. As a result, the human editor can now have an 1) RTE, followed by 2) a "macro" followed by 3) RTE/Macro/Whatever! #OutOfBox
Thanks Marc Goodson for your help! Hope this helps someone else.
I think it may depend on what the macro does. I have created simple html macro's that render ok in an RTE in the grid, however macro's with code I have not had any success in the rte
As you can see it is a very simple macro.
Ya, it's not with the macro contents. The macro is not even executing. I need an Umbraco v8 version of "umbraco.library:RenderMacroContent()". Does anybody know what that is?
OK, I haven't worked extensively with Umbraco sense like v4.7. I still had "old thinking" going on and was tunnel-vision on "insert macro through RTE" solution. Turns out I solved it differently.
Check out the screen shot below. I went in and configured my "columns" in my "grid editor" to allow "Macros" instead of just "Rich Text Editor" and "Head Line" as they were defaulted to. As a result, the human editor can now have an 1) RTE, followed by 2) a "macro" followed by 3) RTE/Macro/Whatever! #OutOfBox
Thanks everyone for your help! Hope this helps someone else.
is working on a reply...