Hidden content macro displaying in search

Hi, 

I've set up a hidden contents macro for my confluence instance. This is so I can put synonyms and keywords into the page without the user seeing it. 

 

It works fine, however I have noticed that when you search on the keywords or synonyms it shows all the data you might have put into the macro within the search result. 

Can anyone think of a way to prevent that? 

searchCaputre.PNG

 

Thanks!

Hollie

1 answer

0 vote
Ann Worley Atlassian Team Jan 16, 2018

Hi Hollie,

Is the Hidden Contents macro a User Macro you wrote yourself or does it come with an add-on, perhaps? I do not find it on the list of macros that come with Confluence: Macros

There was an issue with hidden page properties macro content being displayed in search results in the past, it was fixed in Confluence 6.0.2 Hidden content of Page Properties macro is available in search when you user have read permissions

Please let me know more about the macro, and also what version of Confluence you are using. If it is a user macro, please post the parameters and code here so I can test it, if it is provided by an add-on please let me know which one.

Thanks,

Ann

@Ann Worley This is one that someone else has written- I'm just using it: 

## This is a macro to allow for hidden page content to be picked up by the search and used by the search engine.
## @param Note:desc=Example: The content below will not appear in your document.

## @param Hidden:type=boolean|default=true|desc=Uncheck to temporarily view the content in your document.

#if ($paramHidden == false)

$body

#end

Did try page properties but that didn't solve my problem as none of the keywords or synonyms worked when using the search. Tried it with really obvious words like cheese or toast so that it should have been the only article served with that word but nothing was returned. 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

399 views 17 9
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you