My personal space at work is on Confluence 4.3.x running the Zen layout. I want to load that at home but I don't run Zen (or want to).
I exported the space as XML.
When I restore from backup it completes but the pages are all rendered with:
Unknown Macro: Zen-section
And nothing else. If i view source ('Storage format') I can see all the content.
I see the xml in question contains what looks like the zen macros in the ac namespace:
<ac:macro ac:name="zen-section"><ac:parameter ac:name="id">854539904</ac:parameter><ac:rich-text-body> ...
Perhaps I can just remove all elements with the ac namespace?
Is there an easy way to allow this restore to happen? I don't want to add the Zen layout but can as a temporary measure if necessary.
I wanted to ask here before playing with the XML first. Mmmm, maybe instead of 'exporting as xml' I should backup. I'll try that though given the restore worked I don't think this will produce a different result.
I really wouldn't recommend editing the storage format. It's fussy work, and you'd be guessing at which parts you need to delete, and could corrupt the page.
A simpler option is to create a User Macro to replace the missing zen-section macro. This will eliminate the Unknown Macro errors and allow page content to display.
The User Macro should contain just the page body.
In the Admin Console's User Macro panel (in Confluence 4.0 and later), name the macro zen-section, and define the body as:
NOTE: the "## @noparams" tag is required
OK no responses :(. Let me ask a different question - what elements are zen specific. I've done some simple tests and obviously
Is, and I'm not finding any other:
In my test pages though it sounds pretty generic. So I'll delete parameters that are at the start of a zen-section only.
Are there any others that are Zen specific (ie. a definitive list)?
Well more thoughts & feedback and I'm gonna keep babbling until I say something that pricks up someone's ears!
Another matter I didn't discuss in the question is that the Zen-section macro is in a CData section:
<![CDATA[<ac:macro ac:name="zen-section"><ac:parameter ac:name="id">854539904</ac:parameter>
I wonder if this just happened in the export since they are not normal CFL macros. But then why when I tried to restore from backup this XML did they get parsed? By definition CData data should not be parsed.
Has anyone any thoughts or knowledge of this?
Follow-up to last comment ...
It appears that all data AND presentation macros are in CDATA sections. I guess this prevents namespace issues but its kinda weird as CDATA is not meant to contain markup. I'm also seeing nested CDATA sections (which is illegal XML). Is this a problem caused by Zen or by Atlassian?
<property name="body"><![CDATA[<ac:macro ac:name="zen-section"><ac:parameter ac:name="id">854539904</ac:parameter><ac:rich-text-body><h1>Entity Manager</h1><h2>Monday 16/9/2013</h2><p>Last week I refactored the ESA2 application into Multi-Modules including splitting the Entities,&nbsp;<code>EntityProducer</code> and&nbsp;<code>persistence.xml</code> into the&nbsp;<code>esa2-data</code> project and the&nbsp;<code>CrudService</code> in the&nbsp;<code>esa2-persist</code> project.&nbsp; The web application ... from the DB):</p><ac:macro ac:name="code"><ac:plain-text-body><![CDATA[java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory
I think I understand the processing model.
Sorry, thinking out loud (trying to make sense of what I see and understand it)!
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs