Macro inserted using TinyMCE doesn't render - Options
ntootell
Posted: Thursday, January 31, 2008 1:21:04 PM

Rank: Newbie

Joined: 8/28/2007
Posts: 11
Location: Ealing, London
Hi all,

Has anybody seen a bug where a macro inserted using TinyMCE doesn't render in the published content?

I have a macro that inserts some contact details, and whilst it looks fine in the editor, when I come to view the page on the website I get the following tag where the macro content should be...

************

<?UMBRACO_MACRO chosenfilesource="1187" macroAlias="InsertDetails" />

************

Almost like the macro isn't triggering.

Anyone seen anything like this?

Many thanks

Neil

• loving umbraco • london
drobar
Posted: Thursday, January 31, 2008 3:08:12 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,408
Location: KY, USA
Hi, Niel,

I don't know if this is related, but don't you need your macro to have both an opening and closing tag, rather than closing itself? In other words,

<?UMBRACO_MACRO chosenfilesource="1187" macroAlias="InsertDetails"></?UMBRACO_MACRO>

rather than

<?UMBRACO_MACRO chosenfilesource="1187" macroAlias="InsertDetails" />


Another thing you can try, for testing purposes, is to insert your macro in a template. If it doesn't render then, the problem is in the macro itself and isn't related to TinyMCE.


cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
ntootell
Posted: Friday, February 01, 2008 10:34:12 AM

Rank: Newbie

Joined: 8/28/2007
Posts: 11
Location: Ealing, London
Cheers Douglas,

If I view the source of the TinyMCE then it renders correctly and shows the proper content within the macro tags. It's just when it renders on the site that it puts in a self closing macro with nothing inside.

I'll have another dig through - but many thanks for your response.

Neil

• loving umbraco • london
imayat12
Posted: Friday, February 01, 2008 3:09:10 PM

Rank: Addict

Joined: 7/19/2006
Posts: 580
Location: Preston, UK
Niel,

After inserting the macro did you rename macro alias? That will stop it triggering until you update the template or page

Regards


Ismail

Level 2 certified. If it aint broke dont fix.
Mitja
Posted: Monday, June 30, 2008 5:57:44 PM
Rank: Newbie

Joined: 5/22/2008
Posts: 21
Location: Slovenia
Did you find out solution for this? I am experiencing same error, when i insert a macro with TinyMCE the HTML for it looks like:

Code:
<div umb_mpNumberOfItems="10" umb_macroAlias="mNewsListing" ismacro="true" umbVersionId="be8a72e3-e5c1-4c94-aec0-313df6f5d8d5" umbPageid="1118" contentEditable="false" title="This is rendered content from a macro" onresizestart="return false;" ondblclick="umbracoEditMacro(this);" class="umbMacroHolder mceNonEditable">
<!-- startUmbMacro --><span>This macro does not provides rendering in WYSIWYG editor</span><!-- endUmbMacro -->
</div>


And the output is:

Code:
<p><?UMBRACO_MACRO mpNumberOfItems="10" macroAlias="mNewsListing" /></p>            


Im using IE 7 for this. On FireFox i get similar thing.

[code]<p><?UMBRACO_MACRO macroAlias="mNewsListing" mpnumberofitems="10" /></p>/code]

I don't know if the capitals make a difference or not, since macro is not running in eather case.

P.S.: I played with Render macro content in editor, and it renders fine, but when you look at the output code it is the same as is without that option.
Mitja
Posted: Monday, June 30, 2008 6:00:19 PM
Rank: Newbie

Joined: 5/22/2008
Posts: 21
Location: Slovenia
Oh, and macro works fine if i insert it into template.

p.s.: When i tried to edit topic above i got server error message. Url was: http://forum.umbraco.org/yaf_postmessage.aspx?m=26634
NeilG
Posted: Monday, July 14, 2008 4:32:11 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
i've got the same problem, anyone solved this?





___________________________________________________________________________________

Neil
EdMarden
Posted: Monday, July 14, 2008 6:15:17 PM
Rank: Newbie

Joined: 4/9/2008
Posts: 15
Location: UK
Hi Neil,

Are you certain it's not the same issue I was seeing?

http://forum.umbraco.org/yaf_postst4992_Macro-rendering-in-editor-but-not-on-site.aspx

Regards
Ed.
NeilG
Posted: Tuesday, July 15, 2008 1:04:03 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
Nope, I'm running 3.0.5 and the capitilization appears fine.

Its just rendering the "<?UMBRACO_MACRO" directly in to the output, not executing it.


___________________________________________________________________________________

Neil
PeterD
Posted: Tuesday, July 15, 2008 1:26:24 PM

Rank: Fanatic

Joined: 7/20/2006
Posts: 449
Location: NL
Hi Neil,

is your site upgraded from a 2.1 version to 3.0.5?
I did have the same issue as you had. My feeling tells me it has something to do with the upgrade-process from 2.1 to 3, but I have no proof of that, neither do I have a solution.
I fixed the problem by starting a fresh site in 3.0.5, and it works for me now.

Sorry I can't be of more help.

PeterD

Working on an events-calendar with recursion. Post requests on my blog!
NeilG
Posted: Tuesday, July 15, 2008 2:10:44 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
Ok. I've found my problem ... should have realized earlier.
I'm rendering the contents of my property via a macro. If I reference the field in my template, the macro inserted into the content works fine.

Is there away round this?


___________________________________________________________________________________

Neil
NeilG
Posted: Tuesday, July 15, 2008 2:34:34 PM

Rank: Aficionado

Joined: 12/15/2006
Posts: 112
Found the answer

http://forum.umbraco.org/yaf_postst5126_Parsing-ltUMBRACOMACRO-gt-tags-with-xsl-when-embedded-within-data-node.aspx



___________________________________________________________________________________

Neil
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.