Random Formatting problem in Confluence

Hello,
I've just had another case of a random but recurring formatting problem in Confluence.

In this case, the user has been editing a page that already existed but only contained one short sentence and the TOC and Children Display macros. These were both inside Column macros that were inside a Section macro.

He had entered various bits of text above the Section/Column area, saving the page as he went along.

He then entered a new line of text and pressed return to start a second, which he then tried to format as a heading using the drop down menu to select heading 3.

This is where it all goes wrong.

Instead of the new line being formatted as H3, the text in BOTH the Column macros became H3, and the cursor jumped from the page into the first of the two Column macros.

We had a look at the HTML, but couldn't see any reason for this happening, though we could see the result - see the HTML for the macros below.

Having fixed this in the HTML, my colleague saved the page and the problem went away. He's had this problem in the past, as I said above, so this isn't a one off. It's just random.

The page he was working on was one of a set of pages that we automatically create using a Python script. So this might be part of the problem. However, no one else has had the same problem as far as I know. If I find out that they have, I'll update this question.

So, any clues?
Cheers.


PAGE HTML

<h1>Title</h1>
<p>Design Document - sometexthere (sometexthere)</p>
<h1>heading</h1>
<p>sometexthere.</p>
<h1>heading</h1>
<p>sometexthere.</p>
<h3>heading</h3>
<p>sometexthere.</p>
<p>sometexthere - &lt;Name&gt;<br/>sometexthere - &lt;Name&gt;<br/>sometexthere - &lt;Name&gt;</p>
<p>sometexthere - &lt;Name&gt;</p>
<h3>heading</h3>
<p>sometexthere.</p>
<p>sometexthere - &lt;Name&gt;<br/>sometexthere - &lt;Name&gt;<br/>sometexthere - &lt;Name&gt;<br/>sometexthere - &lt;Name&gt;<br/>sometexthere - &lt;Name&gt;</p>
<p>sometexthere - &lt;Name&gt;</p>
<p>sometexthere.</p>
<h3>heading</h3>
<p>sometexthere.</p>
<p>sometexthere &lt;HERE&gt;.</p>
<p>sometexthere.</p>
<h3>heading</h3>
<p>&lt;sometexthere&gt;</p>
<p>sometexthere</p>
<h3>heading</h3>
<p>&lt;sometexthere&gt;</p>
<p>sometexthere</p>
<h3>heading</h3>
<p>&lt;sometexthere&gt;</p>
<p>sometexthere</p>
<ac:macro ac:name="section">
<ac:rich-text-body>
<ac:macro ac:name="column">
<ac:rich-text-body>
<h3>
<strong>Contents</strong>
</h3>
<h3>
<ac:macro ac:name="toc">
<ac:parameter ac:name="maxLevel">2</ac:parameter>
</ac:macro>
</h3>
</ac:rich-text-body>
</ac:macro>
<ac:macro ac:name="column">
<ac:rich-text-body>
<h3>
<strong>Further Information</strong>
</h3>
<h3>
<ac:macro ac:name="children">
<ac:parameter ac:name="style">h5</ac:parameter>
<ac:parameter ac:name="page">Ports Expansion</ac:parameter>
<ac:parameter ac:name="depth">1</ac:parameter>
</ac:macro>
</h3>
</ac:rich-text-body>
</ac:macro>
</ac:rich-text-body>
</ac:macro>

3 answers

Are you using any macros that encapsulate code? I've seen problems like this where you use an encapulation macro incorrectly. The most recent example I've seen was where someone used an HTML macro to encapsulate text from a configuration file that happened to contain "<" and ">" that were not HTML tags. This caused funky behavior with the TOC.

An easy way to troubleshoot the problem is to create a test page and copy one section of the broken page at a time and paste them to the test page. Everything will display properly until you get to a point where it breaks and you can isolate the problematic section. I've seen cases where things display properly in "Preview" mode, but not when the page is saved, so you might want to use "Save" rather than "Preview." I hope that helps.

Dave's right, simple as possible and add more on. I've also found starting from a known good page created by hand, exporting it and looking at the XHTML helps a lot.

Dave,

No we aren't doing that. The HTML above is the entire HTML for the page, minus the confidential content.

You're other idea might be helpful though. I'll try to remember it the next time this problem randomly happens. :)

Matt,

that's also a good idea, one I'll have to find some time to investigate. :)

I've just spoken to my colleague who runs the Python script, and she says no one has ever reported formatting problems to her. Which doesn't prove very much either way, but at least we know now. :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 3 hours ago in Featured Groups

Want to know how Atlassians monitor their enterprise deployments?

At Atlassian, we believe in our own products – that's why we use them, even at the enterprise level. Doing so gives us first-hand experience of how they perform at scale; to do this, we monitor each ...

11 views 0 0
View post

Atlassian User Groups

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!

Find my local user group

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

Groups near you