Forums

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

page properties report macro showing "no content found" when page title contains "-"

johan milio October 24, 2018

I have a template which contains both a page properties macro (set to hidden) and a corresponding page properties report macro;

One of the elements I use as a filter in the report macro is the "with title" element (for which i used a default value in the template): I replace the default value with the real title of the page i will create using the template

When I create a page based on this template, and i fill out the values in the page properties table, and I replace the "with title" field in the page properties report macro with the actual title of the page, they show up in the page properties report correctly;

But when the page contains a hyphen ("-"), the result of the page properties report macro is "no result found"; (when i remove the hyphen, both in the title of the page and in the "with title" field in de macro, all works fine again.

Is this a bug?

2 answers

1 accepted

1 vote
Answer accepted
Bill Bailey
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.
October 24, 2018

A hyphen is a reserved character for search. Try escaping it with a backslash (\), for example if the page name is:

some-page

Try entering

some\-page
johan milio October 25, 2018

Hi Bill,

I did as you suggested, and backslashed the name in the "with title" field, and it worked indeed!

johan milio October 25, 2018

but then I tried something else; this is what I tried:

step 1:  title contains "-" e.g. This-title; I entered "This-title" in the forementioned field, and got the error

step 2: remove the "-", so title becomes "This title"; entered that in the field: it works

step 3 (this is your suggestion): again add the "-", so "The-title", but now enter "The\-title" in the field: it works

step 4: first use the title without the "-", so "This title" and enter that in the field; than change the title back to the original, WITH the "-", so "This-title", BUT DO NOT CHANGE the value in the field (This title): it works too!

 

Why am I doing this? because the pages are created by a plugin (Send EMail To Page Admin) from email. And I do not want to change them (their title)

Bill Bailey
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.
October 25, 2018

I think #4 worked because Confluence is good in resolving page names that have changed (based on pageID).

Like johan milio likes this
0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2018

Hi Johan,

Thank you for reporting this. I'd like to replicate, so can you tell me what version of Confluence you're using? Are you using the macro in combination with any other macros besides the Page Properties macro?

In addition, can you tail the Confluence server logs the same time you generate the error, and share with us the error you receive? I can use this additional information to search our known bugs to see if it's related to any existing issue.

Regards,

Shannon

johan milio October 25, 2018

Hello Shannon,

version: Confluence 6.11.2

"tail the Confluence server logs": how do I do this?

BTW: also see my reply to the answer given by Bill....

Deleted user July 11, 2019

@Shannon S 

I experience similar behavior in Confluence 6.14.2.

 

When entering space name nothing happened. in name there is only one special mark "&"

Samuel Coleman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 8, 2020

I have the same issue with page not showing the list of pages but I have no hyphen in the name.  What else can I look for to be the issue.  No matter what I do, I get the No Content message

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

@[deleted] and @Samuel Coleman,

The advice mentioned by @Bill Bailey is correct, special characters need to be escaped in search. Since macros are using Confluence search, you will need to do the same.

You can see in Confluence Search Syntax:

Phrases with special characters

Confluence ignores all symbols, such as hyphens or underscores, even if they are included within double quotes.

For example, if you search for "DOC-8510", you get all pages containing 'doc' and '8510'.

Avoid using special characters, such as hyphens, in page or attachment names as they may not be found by Confluence search.

It's best to avoid using special characters in your page and attachment names at all, but if you need to use them, then you'll need to escape the character in the macro parameters with \ as Bill suggested.

If you are having the same issue with a page and there are absolutely no characters in the title (such as % & ? / \ ; " § +), then this is probably a different issue. I would recommend raising a new question for that, or a ticket with Confluence Support.

I hope this is clear, but let me know if you have any doubts.

Take care,

Shannon 

Like Michelle Rau HP likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events