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

Its possible to insert null labels for pages into the database

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Low
    • None
    • 3.0.1, 3.0.2, 4.2.8
    • None

    Description

      Having null labels in the database throws the exception -

      java.lang.NullPointerException
      at java.lang.String.compareTo(String.java:1168)
      at com.atlassian.confluence.labels.actions.RankedNameComparator.compare(RankedNameComparator.java:13)
      at java.util.TreeMap.put(TreeMap.java:530)
      at java.util.TreeSet.add(TreeSet.java:238)
      at com.atlassian.confluence.labels.DefaultLabelManager.getRankedLabels(DefaultLabelManager.java:463)
      at com.atlassian.confluence.labels.DefaultLabelManager.getMostPopularLabelsWithRanksInSpace(DefaultLabelManager.java:449)
      

      Currently, there is no constraint in the Database which disallows null labels - we should check for nulls.

      One of the known cause of this is due to Checklist Macros plugin's bug CHK-68.

      Workaround

      You can delete the null label from the database by:

      1. Backup your database
      2. Run this query to find the label id of the null label.
        select LABELID from LABEL where NAME is null;
        
      3. Run this query to delete all the null label from the CONTENT_LABEL table. Replace the <LABEL_ID> with the labelid of the null label.
        DELETE FROM CONTENT_LABEL
        WHERE LABELID=<LABEL_ID>
        
      4. Run this query to delete all the null label from the LABEL table.
        DELETE FROM LABEL
        WHERE LABELID=<LABEL_ID>
        
      5. Restart Confluence

      Attachments

        Issue Links

          Activity

            People

              shaffenden Steve Haffenden (Inactive)
              asridhar AjayA
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: