Details
-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
4.0, 4.1.5
-
Tested on Confluence 3.5.13 -> 4.1.2 upgrade.
Description
Issue description
The following 2 scenarios will have the same result:
Scenario 1
- Say we have a table in Confluence 3.5.13 with the following wiki markup:
|| header 1 || header 2 || header 3 || | cell a1 | cell b2 | cell c3 | | cell d1 | cell e2 | cell f3 | | cell x1 | cell y2 | cell z3 |
- Upgrade to Confluence 4.1.2, it will become like this:
Note the header style and row/cell height difference.
I didn't do a normal upgrade in this case. I hack the 4.1.2 DB by inserting the plain wiki markup to BODYCONTENT.BODY and set the BODYCONTENT.BODYTYPEID to 0, and force the wikiToXhtmlMigrationUpgradeTask.
Scenario 2
This is done in 4.x Confluence
- Insert a table using the RTE table toolbar. It looks like this:
- Insert the following wiki markup to Confluence's Insert wiki markup:
|| header 1 || header 2 || header 3 || | cell a1 | cell b2 | cell c3 | | cell d1 | cell e2 | cell f3 | | cell x1 | cell y2 | cell z3 |
It will become like this:
Note the header style and row/cell height difference.
Possible cause.
It seems that wikiToXhtmlMigration is the reason of the difference here. Here is the storage format of the both versions:
storage format of table using RTE
<table> <tbody> <tr> <th>header 1</th> <th>header 2</th> <th>header 3</th> </tr> <tr> <td>cell a1</td> <td>cell b1</td> <td>cell c3</td> </tr> <tr> <td>cell d1</td> <td>cell e2</td> <td>cell f3</td> </tr> <tr> <td>cell x1</td> <td>cell y2</td> <td>cell z3</td> </tr> </tbody> </table>
storage format of table using insert wiki markup or in post-upgrade
<table> <tbody> <tr> <th> <p>header 1</p> </th> <th> <p>header 2</p> </th> <th> <p>header 3</p> </th> </tr> <tr> <td> <p>cell a1</p> </td> <td> <p>cell b2</p> </td> <td> <p>cell c3</p> </td> </tr> <tr> <td> <p>cell d1</p> </td> <td> <p>cell e2</p> </td> <td> <p>cell f3</p> </td> </tr> <tr> <td> <p>cell x1</p> </td> <td> <p>cell y2</p> </td> <td> <p>cell z3</p> </td> </tr> </tbody> </table>
It seems that in the latter version, each cell value is wrapped with <p>.
Workaround:
Add the following CSS to make it look the same:
<style> .confluenceTh p, .confluenceTd p { margin-bottom:0 !important; } </style>
This should be added in Browse > Confluence Admin > Custom HTML > At beginning of the BODY.
Attachments
Issue Links
- duplicates
-
CONFSERVER-24488 Table entered via Wiki Markup Dialog Box wraps cells in p tags.
- Closed