Non-breaking space HTML entity causes issues when rolling up Page Property Macro to Report level


Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Problem

When creating a Page Properties Report macro , it rolls up values from pages which have Page Properties Macro. In this one scenario , the values that appears for Field1 Field2 appears as null for some pages since the column value does not match the definition at  Page Properties Report macro. This since there could be scenarios where there are mismatching invisible characters like below. 

  • Create 2 pages with Page Properties macro, let's call these pages Page NBSP and Page Space

  • On Page NBSP you create a Page Properties macro which has the following columns, Version and Field1 Field2. You can find more information on use of columns at  https://support.atlassian.com/confluence-cloud/docs/insert-the-page-properties-macro


    • Now review this same page using View Storage Format (this is available on your right on the menu - find the hamburger or 3 dotted menu). You will see the value between Field 1 and Field 2 appears as below - this is not a common space but in fact the character "&nbsp" (Ref : https://www.w3schools.com/html/html_entities.asp#:~:text=A%20commonly%20used%20entity%20in,the%20words%20might%20be%20disruptive). Its a commonly used entity in HTML i.e the non-breaking space:   A non-breaking space is a space that will not break into a new line.

      <table data-layout="default">
      <tbody>
      <tr>
      <th data-highlight-colour="#f0f0f0">
      <p><strong>Version</strong></p></th>
      <td>
      <p>e</p></td></tr>
      <tr>
      <th>
      <p><strong>Field1&nbsp;Field2</strong></p></th>
      <td>
      <p>f</p></td></tr></tbody></table>
  • On PageSpace , you see visibly the same format as above , but in closer inspection, these are actually referring to a common space. 

    • See the View Storage Format below for this page will show the character between Field1 and Field2 now is an actual space.

      <table data-layout="default">
      <tbody>
      <tr>
      <th data-highlight-colour="#f0f0f0">
      <p><strong>Version</strong></p></th>
      <td>
      <p>a</p></td></tr>
      <tr>
      <th>
      <p><strong>Field1 Field2</strong></p></th>
      <td>
      <p>b</p></td></tr></tbody></table>
  • The problem appears when these 2 pages are rolled up at the Page Properties Report macro, and the values that is being returned is different. 
    • Page Properties Report macro has the the following configuration

Cause

The published Page Properties Report macro page shows the value below, see that the Field1 Field2 values appears as null for Page NBSP. This is simply due to the fact that the definition in the Columns to show is expecting a space (Field1 Field2) which is how it appears at Page Space but not at the Page NBSP which holds the HTML entity character (Field1&nbsp;Field2). See that the Page NBSP has the value for Version appear correctly but not for Field1 Field2,it instead appears as null.

 

Resolution

The 2 methods to resolve this issue is highlighted below

  • You can choose to use one word as column values - this will ensure there is no introduction of the NBSP character at all in your Roll Up scenario

  • You can choose to correct the values to match the required value at the Page Property Report macro
    • In the example above , ensure that Page NBSP has the "Field1&nbsp;Field2" corrected to "Field1 Field2"




Last modified on Aug 28, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.