Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Error rendering macro ToC - duplicate class

Hi there,

I am working with a client who has no confluence admin / owner currently that is technical enough to look into where the Confluence Server 5.3 is hosted (i am working on finding people though and getting some admin rights assigned).

I was updating pages with a bit of HTML with style and div html tags (for a header toolbar) and several (but not all) ToC Macro's seem to have broke with a duplicate class error. 

After spending much time, and trying to resolve this issue several times through different approaches I am no further forward. Can anyone recommend a solution I have copied the code from my HTML Include macro below (the links have been changed to protect client identity). I seen some people having similar exceptions copy the duplicate html classes but when I inspect the code I only get the error message, so not sure how to obtain that detail? 

Any help or suggestions greatly appreciated! 

Paul

Error: 

Error rendering macro 'toc' : [com.ctc.wstx.exc.WstxLazyException] com.ctc.wstx.exc.WstxParsingException: Duplicate attribute 'class'. at [row,col {unknown-source}]:

<style>
ul.menu {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #00877c;
}

li.menu-float {
    float: left;
}

li.menuItem a {
    display: block;
    color: white;
	font-size: 24px;
    text-align: center;
    padding: 25px 20px;
    text-decoration: none;
}

a.menu-link {
	color: white;
}
/* Change the link color to #111 (black) on hover */

li.menuItem a:hover {
    background-color: #005293;
}
 
li.menuItem a:active {
    background-color: #4CAF50;
}
</style>

 <div>
<img src="download/attachments/43188283/Small%20Logo.png">
 </div>
 
<div>
<ul class="menu">
<li style="float:right;font-size:24px;color:white;padding: 25px 20px;"><form class="search" method="POST" action="/plugins/pagetreesearch/pagetreesearch.action" class="aui" name="pagetreesearchform">Search
            <input type="hidden" name="ancestorId" value="43188283">
            <input type="hidden" name="spaceKey" value="somespace">
            <input style="height:30px;font-size:24px;" type="text" class="text medium-field" size="20" name="queryString">
            <input style="border:none;background-color:4CAF50;" class="aui-button" type="submit"  value="Search">
        </form></li>
</ul>
<ul class="menu">
  <li class="menuItem menu-float"><a style="color:white" href="/1">Home</a></li>
  <li class="menuItem menu-float"><a style="color:white" href="/2">Process</a></li>
  <li class="menuItem menu-float"><a style="color:white" href="/3">Screens</a></li>
  <li class="menuItem menu-float"><a style="color:white" href="/6">Policy</a></li>
  <li class="menuItem menu-float"><a style="color:white" href="/#">Rules</a></li>
  <li class="menuItem menu-float"><a style="color:white" href="Interfaces">Interfaces</a></li>
</ul>
</div>
 

 

1 answer

0 votes
Fabian Lim Community Leader Dec 23, 2021

Hi Paul,

This looks an known issue as stated here: https://jira.atlassian.com/browse/CONFSERVER-53138

and there is a workaround posted.

Regards

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

43,325 views 32 134
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you