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

Special characters on page names can cause incorrect links to undefined pages due to existing database issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 6.14.2, 6.14.3
    • Content - Linking
    • None

      Issue Summary

      When adding a link to a Confluence page with special characters in its name (such as accented characters), after saving the page, the link changes to an undefined page with the same name.

      When querying the database for the linked page, two pages with the same 'title', but different 'lowertitle' show up. One of them is the actual page, the other is the incorrectly created draft from the undefined page link.

      This only seems to happen when the existing page already has an incorrect conversion of an accented character on the 'content' table, from upper to lowercase (the new draft has a correct 'lowertitle' conversion). This could be due to an instance migration, database update/migration, or similar operations - ultimately, this is the actual cause of the issue, but the problem may not become apparent until a link to the problematic page is created.

      This can be checked with the following query:

      select * 
      from content 
      where lower(title) <> lowertitle
      order by "version",title
      

      Environment

      Issue is reproducible on PostgreSQL 9.6.12

      Steps to Reproduce

      1. Find a page that has an incorrect lowercase title on the database, due to a special character on its title (using the above query, for example)
      2. On any page, create a link to the problematic page
      3. Save the page

      Expected Results

      The link keeps pointing at the chosen page, after saving the page.

      Actual Results

      The link changes to an undefined page link instead. Checking the database with the above example query, there are now two different pages with the same title, but different lowercase title.

      Workaround

      Since the problem is caused by an existing incorrect conversion of a page title to lowercase, on the database, this can be fixed by deleting the undefined page from the database, and then manually fixing the page's 'lowertitle' field as well:

      update content set lowertitle = LOWER(title)
      where lower(title) <> lowertitle
      

              Unassigned Unassigned
              fmorais Felipe Morais (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: