Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Content by Label Macro Error - 'With Ancestor' not working

Evan Powell July 21, 2020

Hello,

 

I am trying to tabulate documents with a specific label from other pages in different page trees within the same space using the content by label macro. When I only use the label and space filters in the macro, it seems to work perfectly fine.  In other words, it is searching the whole space.  However, I only want to look at documents with a specific ancestor so I use the 'with ancestor cql filter as described here (https://confluence.atlassian.com/doc/content-by-label-macro-145566.html).  When I do this, the documents do not appear in either the page where I placed the Macro or in the preview in the editor.   I know these documents exist because that is where the first macro pulled them from.

 

Does anyone else have the same issue?

2 answers

3 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2020

Hello, Evan!

I was just working with @Dominic Lagger when I heard about your issue.

It appears to be related to a bug we have reported in Confluence Server, which is specifically with the search capabilities:

  • CONFSERVER-56163 Searching attachments with filter ancestors will return no results.

The behavior is very similar; when searching for attachments in Confluence Advanced Search, if you limit to Pages Under (Ancestors), then no attachments are found. The same thing doesn't occur if simply search for text.

I was able to replicate this in Cloud too, so I created a bug for that:

  • CONFCLOUD-70485 Searching attachments with filter ancestors will return no results.

Unfortunately, there's currently no known workaround for this, other than unchecking the ancestors filter.

Thank you again for reporting this, and I recommend watching the bug so you can be updated of any progress in the future.

Take care,

Shannon

Evan Powell July 23, 2020

Thank you for looking into it!  I will watch both bugs.

Like Shannon S likes this
0 votes
Dominic Lagger
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 21, 2020

Hi @Evan Powell 

I have a few questions to get more informations:

  1. By documents, do you mean confluence pages or attachments?
  2. Did you already tried to find the documents via the confluence search? (See CQL documentation). Can you find them in the confluence search? 
  3. Are the documents really a child of your ancestor page? 
  4. Do you use other plugins like Scroll Versions? 

Thanks for sharing the answers

Regards, Dominic

Evan Powell July 22, 2020

@Dominic Lagger 

Thanks for the response!  To answer your questions...

1.) I mean attachments.  Files that I have uploaded to specific pages within the space and labeled.

2.) Just tried it and no, they do not appear.  I also went to the attachments in question, clicked on their label, and it showed me all of the attachments with that label as I would assume that the search should have but didn't.  I also did the same with other labels throughout the space and the same thing.  The search I did was {label = "my_label"}.

3.) Yes, it is the correct ancestor.  It is the top-most page of the page-tree for the specific page where the attachments are located.  The attachments are in a different ancestor than that of the page where the Content by Label Macro is located, but they are all in the same space. 

4.) I am not familiar with Scroll Versions.

Dominic Lagger
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 22, 2020

Okay, I can definitely reproduce this behavior (Confluence Server 7.4.1). I didn't found any bugs in the atlassian backlog.

We can clearly see, that the page "Label Attachment" has an attachment with the label "dokuguide"

image.png

And here with the ancestor page "Label Attachment" (which holds the attachment), there is no result:

image.png

I asked the other community leaders and atlassian members for help.

Regards, Dominic

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events