Getting error message with include macro saying: Unable to render {include} Already included page

Alex Yasurek
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.
November 15, 2018

I have a custom plugin that pulls various pages using the include macro into a single page. After upgrading to confluence 6.11.2, I keep getting a message saying something like :

Unable to render {include} Already included page 'test page', stopping.

Unable to render {include} Already included page 'test page', stopping.

Unable to render {include} Already included page 'test page', stopping.

Unable to render {include} Already included page 'test page', stopping.

"Test page" is the page I added the plugin to but I am pulling the includes from another space. In the example above it suppose to pull 2 pages from another space and display the content one after the other. Instead, it displays that message 4 times. 

If I were to try to include 3 pages it would display that message 9times, 4 includes = 16times, etc. 

I know for a fact that I am passing the correct parameters to the include macro in the plugin because when I have it output the parameters it's from a different space. 

#set($pageKey = "$spaceKey:$title")
$action.getHelper().renderConfluenceMacro("{include:$pageKey}")

It seems like its trying to include the current page it is in but not sure why. This works fine in confluence 6.4.3 and even if I spin up a local instance fo confluence 6.11 it works fine. It just is not working on our staging instance after we upgraded. 

I even went into safe mode and only enabled this custom plugin and it still gave the same message.

Anyone happen to know why or ran into this issue before?

 

Thanks

 

1 answer

0 votes
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.
November 17, 2018

I assume you are trying to do this as a user macro? If so, I would take the other route and just configure the storage code version of the Include macro:

  <ac:structured-macro ac:name="include" ac:schema-version="1">
    <ac:parameter ac:name="">
      <ac:link>
        <ri:page ri:content-title="$paramPageName"/>
      </ac:link>
    </ac:parameter>
  </ac:structured-macro>
Alex Yasurek
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.
November 17, 2018

HI, No its a plugin I created using the SDK.  I have tried this before but I didnt get any output from the plugin. 

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.
November 17, 2018

I vaguely remember discussions that .renderConfluenceMacro was being deprecated (or at least no longer present in the velocity context), in favor for:

convertStorageToView('<ac:structured-macro ac:name="cheese"></ac:structured-macro>;')

It may be that either issues with that method or deprecation of the wiki markup for Include in that context. You may find this article useful:

https://davidsimpson.me/2014/02/27/an-alternative-to-renderconfluencemacro/

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events