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

Content by Label broken when adding filter 'With parent = Current page()' and the current page doesn't have child pages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 7.0.2, 7.1.0, 7.2.2
    • None

    Description

      Issue Summary

      Content by Label will return an error message when the filter 'With parent = Current page()' is added but that current page doesn't have a child page.

      Environment

      Replicated with Confluence 7.0.2

      Steps to Reproduce

      1. Create page 1 with no child page
      2. Add label, 'test' to page 1
      3. Create page 2 and add "Content by Label" macro to it
      4. Insert 'test' for label
      5. Select "Add a Filter" and pick "With Parent"
      6. Pick "Current Page"
      7. Click on "Preview"

      Expected Results

      The macro will return a message such as "There is no content with the specified conditions"

      Actual Results

      The macro error message:

      Error rendering macro 'contentbylabel' : At least one must or should or not query parameter needs to be supplied.
      

      The below exception is thrown in the atlassian-confluence.log file:

      java.lang.IllegalArgumentException: At least one must or should or not query parameter needs to be supplied.
      	at com.atlassian.confluence.search.v2.BooleanQueryBuilder.build(BooleanQueryBuilder.java:74)
      	at com.atlassian.confluence.plugins.cql.v2search.query.ContentIdQuery.expand(ContentIdQuery.java:74)
      	at com.atlassian.confluence.plugins.cql.v2search.query.ContentIdQuery.expand(ContentIdQuery.java:19)
      	at com.atlassian.confluence.search.v2.SearchExpander.expandAll(SearchExpander.java:19)
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jwaihou Jonathan Soo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: