Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Obsolete labels showing up in Labels list

Lotta Lilja February 12, 2018

I have problems with old, deleted, labels still showing up in the labels lists. The labels list show both current and obsolete labels, i. e. not currently used on any page in the space. Now these label names show up in the list anyway, which will be confusing to my users, since the obsolete and current labels sometimes have very similar names.

I am using Brikit Targeted Search to get Label groups, but Brikit tells me this is a Confluence labels functionality problem. 

So how do I get the labels list macro to show only the lables actually existing on the current pages?

 

2 answers

2 votes
Sharon Metzger March 16, 2018

We had a similar issue. I had cleaned up my old terminology fairly well, including labels. The labels still showed up in my 'Labels List' macro, but clicking on them showed me no pages with that label. 

In some cases I had edited pages and labels to use new terms, in some cases I deleted obsolete pages. After reindexing, the old labels still appeared. We figured out the pages I'd deleted were still in the space's Trash. Emptying the trash cleared the labels.

Merve Nur Bas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 24, 2020

That did the trick! Thank you very much. 

Miriam Hopton February 3, 2022

Thank you so much, Sharon! This worked GREAT. We were having this issue and your direction on how to handle helped so much!

0 votes
Igor M.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2018

Hey,

You can try clearing the plugins cache by following steps in:  How to clear confluence plugins cache

Then try rebuilding the index from scratch by following steps in: How to rebuild the content indexes from scratch

If you still facing issues after that, you can try DB edit, to remove any orphaned labels.

(!) Please test changes first in a test environment before applying to Production.
(!) Always take a backup of your database, confluence home and install directories.

You can run below query to check if any page and which is still using the label in question:

SELECT * FROM CONTENT
WHERE CONTENTID IN (SELECT CONTENTID FROM CONTENT_LABEL
WHERE LABELID IN (SELECT LABELID FROM LABEL
WHERE NAME='[label name]' ));

If no pages show up or pages that do show up don't actually have said label, you can use bellow queries to remove label from DB


Remove the relevant entries form the content_label table first:

DELETE FROM content_label WHERE labelid IN (SELECT labelid FROM label WHERE name = '[label name]');

Then follow that with:

DELETE FROM label WHERE name = '[label name]';

After above edits, make sure you rebuild your index from scratch and clear plug-ins cache, as per first steps in KB.

Hope this helps

Regards,

Igor

Lotta Lilja February 12, 2018

Thanks, I will try that! :-)

//Lena

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events