Issue Details (XML | Word | Printable)

Key: VISIB-26
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: David Peterson
Reporter: Bert Pluymers
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Confluence Extension: Visibility Plugin

{show-to} does not render wiki markup when wrapped around an {include} macro

Created: 09/Aug/07 07:50 AM   Updated: 21/Mar/08 06:46 AM
Component/s: {show-to}
Affects Version/s: 1.5
Fix Version/s: 1.6.0

Time Tracking:
Not Specified

Environment: Confluence 2.5.4
Issue Links:
Relates
 


 Description  « Hide
I essentially tried to use the show-to macro as a workaround for this issue with the include macro. The include macro renders an error message when the page to be included cannot be viewed by the current user. I want to use the show-to macro to make sure that for those users where the include macro would render an error message, the result of the include macro is not shown.

Let me give details on the specific setup:

  • I have 2 user groups: user-group-A, user-group-B
  • I have 2 pages: page 1, page 2, where page 1 is viewable by both user groups and page 2 is only viewable by user-group-A

Page 1 has the following contents:

* link 1 to be seen by all
* link 2 to be seen by all
{show-to:group=user-group-A}
{include:page 2}
{show-to}

Page 2 has the following contents:

h3. header
* link 3
* link 4

When a user from group B tries to view page 1, the result is as expected: only link 1 and 2 are visible.
When a user from group A tries to view page 1, links 1 and 2 are also displayed correctly, but the contents of page 2 are rendered without markup and on a single line:

h3. header  * link 3  * link 4


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Peterson added a comment - 15/Nov/07 07:08 AM
This bug is confirmed. Still figuring out if there is a good solution...

David Peterson added a comment - 15/Nov/07 07:16 AM
Added F_RESOLVE_TOKENS so that macro rendering tokens are resolved before returning the macro results.

Jim LoVerde added a comment - 04/Dec/07 01:36 AM - edited
I think this may have broken other uses of this macro. More specifically, things like this:
{show-to:space=foo}{link-to:add news}create new news{link-to}{show-to}

No longer works. It now renders something like:

<a href="/pages/createblogpost.action?spaceKey=~foo&fromPageId=7">create new entry</a>

Basically, it looks like the inner tags get processed but the result then gets processed as markup rather than as raw HTML. So Confluence encodes the HTML and it shows up in the page.

Actually, it might make sense to make this a parameter and to default to the old behavior since I'm guessing some folks might like either one behavior or the other. And defaulting to the old behavior won't break existing markup using the macro.


David Peterson added a comment - 17/Dec/07 01:55 AM
Yeah, there seems to be some new wackiness with Visiblity. I will be looking at it as soon as possible. In the meantime, I suggest reverting to 1.5 if you can...

Volker Kleinschmidt added a comment - 21/Mar/08 06:46 AM
Apparently this fix caused the breakage discussed in VISIB-29, due to which version 1.6 is essentiallly unusable – I would have liked to know about its instability before installing it and breaking all my public KB pages