content by label macros not working
Asked by Garry Swanson:

Hi, I have a page that displays 3 content by label macros. Each with a different label assigned to them.

When I change the label on a page, the macros don't update when I return to the page.

The first macro uses a "plsreview" label, the second "editor" and the third "approved"

When I add a label to the page, I use the suggested label as I typed

note in the screenshot below that there are "approved: and "editor" labels, but those pages aren't showing up in the third macro.

I have:

* Deleted and added the label
* Reset my cache
* Force reloaded the page
* quit and restarted my browser.

All the macros are set to show 30 pages at a time, and when I click on the "approved" label the page only displays those 4 pages.

Any suggestions on how I can troubleshoot or fix this issue?

Thank you

![label example.png](/t5/image/serverpage/image-id/93158i0638E89B516AD235/image-size/large?v=v2&px=999 "label example.png")


Answers:
author: Diego
body: Hello [@Garry Swanson](/t5/user/viewprofilepage/user-id/3724754) ! As I understand, both the "Content by label" macro and the "Labelled content" page are not working as expected.

I tried to replicate this behavior by doing the following:
> 1. *Create 10 new pages in the same Space*
> 2. *Label them with the "new" label*
> 3. *Place the "Content by label" macro into an already existing page*
> 4. *Select the "new" label to be displayed within the macro, no other filter selected*
> 5. *Publish the page containing the "Content by label" macro*
> 6. *Click the "new" label link that the "Content by label" macro displays*

Results from this test:
> * ***All labeled pages are shown within the macro***
> * ***All labeled pages are shown within the "Labelled content" page***

With this in mind, I would like to check a few things with you:
> 1. *Is there any other filter set up in your "Content by label" macros?*
> 2. *What happens if you create new pages with the desired label?*
> 3. *Are you clicking on the label shown within the macro or the one shown at the bottom of pages?*

There are a few things to take into account:

> 1. **If your "Content by label" macro is using a filter such as "In Space", it will only display content within that specific space.**
> 2. **If you click the label at the bottom of the page, it will redirect you to a "Labelled content" page that reflects content only within the current space itself.**
> 3. **If you click the label within the "Content by label" macro, it will redirect you to a "Labelled content" page that reflects the filters in the macro, such as "In Space"**
> 4. **If there are no filters within the "Content by label" macro, it will redirect you to a "Labelled content" page that is generic to your entire Confluence site.**

You can check if you are looking at the global "Labelled content" page by checking the URL. If it looks like this:
> <https://myconfluencesite.atlassian.net/wiki/label/new>

It is the global "Labelled content" page.

If the link looks like this:
> <https://myconfluencesite.atlassian.net/wiki/label/SPACENAME/new>

It is specifically showing content for SPACENAME only.

This is what the generic "Labelled content" page looks like:
> ![Screen Shot 2020-05-05 at 14.29.51.png](https://community.atlassian.com/t5/image/serverpage/image-id/93525i4D876D829D2B71EF/image-dimensions/473x244?v=v2 "Screen Shot 2020-05-05 at 14.29.51.png")

This is what the Space specific "Labelled content" page looks like:
> ![Screen Shot 2020-05-05 at 14.30.19.png](https://community.atlassian.com/t5/image/serverpage/image-id/93526i2931A54CA5C8C4C0/image-dimensions/472x248?v=v2 "Screen Shot 2020-05-05 at 14.30.19.png")

I hope this helps to guide you! Looking forward to your reply.

comments: author: Richard Cross
body: I'm having the same issue... some labels work with the macro and some don't.

For either, when I find a page with the label and click on that label... it correctly shows all pages with that label, and the URL shows that they're in the same space. If I change the URL to the global view, that also works.

If I edit the macro and remove the restriction on Space, it still doesn't work.

I've only ever found "solutions" recommending a re-index, but that would take hours during which time our 20,000 users are stuck with a slow Confluence system. Additionally, surely the view you get when you click on a label relies on the same index?


author: Carry Megens
body: I have same issue, I too see the content by label macro is showing pages that no longer have the label. How long before the change is picked up? Is this indeed depending on the search index?


Tags: cloud