Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-24683

table row/cell height becomes bigger and table header style becomes different after wikiToXhtmlMigrationUpgradeTask

    XMLWordPrintable

Details

    Description

      Issue description

      The following 2 scenarios will have the same result:

      Scenario 1
      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 |
        

      2. 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

      1. Insert a table using the RTE table toolbar. It looks like this:
      2. 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

        1. c3513_table.png
          c3513_table.png
          22 kB
        2. c3513-table_to_412upgrade.png
          c3513-table_to_412upgrade.png
          25 kB
        3. c412_table_insert-wiki-markup.png
          c412_table_insert-wiki-markup.png
          25 kB
        4. c412_table_RTE.png
          c412_table_RTE.png
          25 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              halatas HuseinA
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: