Issue Details (XML | Word | Printable)

Key: CONF-8756
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Chris Broadfoot [Atlassian]
Reporter: James Mortimer
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Confluence

HTML markup created from {table}{table-row}{table-cell} inserts extra <TD/>'s which interfere with macro-generated HTML contained in tables, unless SnipSnap compatibility macro is disabled.

Created: 22/Jun/07 09:52 AM   Updated: 02/Sep/08 08:13 PM
Component/s: Macros -- General, WIKI / HTML
Affects Version/s: 2.3.3, 2.5.7
Fix Version/s: 2.9

Time Tracking:
Not Specified

Issue Links:
Cause
 

Participants: Cheryl Jerozal [Atlassian], Chris Broadfoot [Atlassian], Don Willis [Atlassian] and James Mortimer
Since last comment: 21 weeks, 2 days ago
Resolution Date: 02/Sep/08 08:13 PM
Labels:


 Description  « Hide
Background: the edit-include macro (see CONFEXT:edit-include user macro) generates html code that contains a style override, that might look like this:
<style type="text/css">
<!--
span.editlink { float:right;position:relative; font-size:0.8em; }
span.editlink span { position:relative; top:0px; right:0px; border:1px solid #DDE; background-color:#EEE}
span.editlink span a { text-decoration:none; font-weight:bold; }
span.editlink span a:hover { background-color:#CFCFDF }
// -->
</style>
<span class="editlink">
<span>
${xhtmlEdit}
</span>
</span>

When this macro is used on a page in a table using wiki markup, everything is fine. If the table is defined using {table} macro set, extra <TD>....</td> tags are inserted for each 'newline' in the above 'style', effectively interfering with the html style declaration. For example this wiki code generates the following HTML. A and B are NOT equivalent to each other: They should be equivalent, or at least, not interrupted with extra <TD>'s.

(note: replace the ()'s with {}'s, but for some reason these don't work for table elements in noformat blocks!!!!!)

h1.  A
(table:border=0)(table-row)(table-cell)
(edit-include:subpage)(table-cell)(table-row)(table)
h1. B
 | {edit-include:subpage} |

Generated html A:

<h1><a name="edit-include-A"></a>A</h1>
<table class="wiki-table" cellpadding="0" cellspacing="0" bo
rder="0"><tr><th><tr><td></th></tr><tr class="table-odd"><td
><style type="text/css"></td></tr><tr class="table-even"><td
><!--</td></tr><tr class="table-odd"><td>span.editlink {</td
></tr><tr class="table-even"><td>float:right;position:relati
ve;</td></tr><tr class="table-odd"><td>font-size:0.8em;</td>
</tr><tr class="table-even"><td>}</td></tr><tr class="table-
odd"><td>span.editlink span {</td></tr><tr class="table-even
"><td>position:relative;</td></tr><tr class="table-odd"><td>
top:0px;</td></tr><tr class="table-even"><td>right:0px;</td>
</tr><tr class="table-odd"><td>border:1px solid #DDE;</td></
tr><tr class="table-even"><td>background-color:#EEE}</td></t
r><tr class="table-odd"><td>span.editlink span a {</td></tr>
<tr class="table-even"><td>text-decoration:none;</td></tr><t
r class="table-odd"><td>font-weight:bold;</td></tr><tr class
="table-even"><td>}</td></tr><tr class="table-odd"><td>span.
editlink span a:hover {</td></tr><tr class="table-even"><td>
background-color:#CFCFDF</td></tr><tr class="table-odd"><td>
}</td></tr><tr class="table-even"><td>// --></td></tr><tr cl
ass="table-odd"><td></style></td></tr><tr class="table-even"
><td><span class="editlink"></td></tr><tr class="table-odd">
<td><span></td></tr><tr class="table-even"><td><p><a href="/
pages/editpage.action?pageId=17597007">Edit</a></td><td><a h
ref="/display/test/subpage" title="subpage">View</a></p></td
></tr><tr class="table-odd"><td></span></td></tr><tr class="
table-even"><td></span></td></tr><tr class="table-odd"><td><
ul class="alternate" type="square"></td></tr><tr class="tabl
e-even"><td><li>this</li></td></tr><tr class="table-odd"><td
><li>is</li></td></tr><tr class="table-even"><td><li>a</li><
/td></tr><tr class="table-odd"><td><li>test</li></td></tr><t
r class="table-even"><td></ul></td></tr><tr class="table-odd
"><td>&#160;</td></tr><tr class="table-even"><td></td></tr><
/td></tr></table> 

Generated html B:

<h1><a name="edit-include-B"></a>B</h1>
<table class='confluenceTable'><tbody>
<tr>
<td class='confluenceTd'> 				<style type="text/css">
		<!--
		span.editlink {
			float:right;position:relative;
			font-size:0.8em;
		}
		span.editlink span {
			position:relative;
			top:0px;
			right:0px;
			border:1px solid #DDE;
			background-color:#EEE}
		span.editlink span a {
			text-decoration:none;
			font-weight:bold;
		}
		span.editlink span a:hover {
			background-color:#CFCFDF
		}
		// -->
		</style>
		<span class="editlink">
			<span>
				<p><a href="/pages/editpage.action?pageId=17597007">Edit</a>|<a href="/display/test/subpage" title="subpage">View</a></p>
			</span>
		</span>
		<ul class="alternate" type="square">
	<li>this</li>
	<li>is</li>
	<li>a</li>
	<li>test</li>
</ul>
 
</td>
</tr>
</tbody></table>


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Don Willis [Atlassian] added a comment - 24/Jun/07 08:32 PM
Hi James,

What table macro are you talking about exactly?

Do you mean the one in Adaptavist's Content Formatting Macros Plugin?

Cheers,
Don


James Mortimer added a comment - 26/Jun/07 10:48 AM
Thanks, Don, for the re-org of this page.

That was my first thought aswell, but I'm not sure anymore! I do have that plugin installed, but specifically disabling the 'table' macro in that plugin doesn't affect my wiki pages that use 'table', so it must be overridden by some other plugin or the core application. I'm not sure how to determine which plugin declares a table macro, short of disabling every plugin one by one, or installing each one by one on a new installation.


Don Willis [Atlassian] added a comment - 26/Jun/07 09:12 PM
Hi James,

luckily for both of us, somebody bumped CONF-7648 today which points the finger for your problem firmly at the Compatibility Macros. Tell me if that is your problem and I'll link this issue to that one.

Cheers,
Don


James Mortimer added a comment - 27/Jun/07 08:34 AM
yes, disabling the snip snap compatibility plugin fixes this problem. thanks don.

James Mortimer added a comment - 30/May/08 08:56 AM
noting in the title the relevance to the snipsnap compatibility macros

Cheryl Jerozal [Atlassian] added a comment - 12/Aug/08 03:49 PM
fixed with CONF-7648