Forums

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

"Recently Updated" Macro does not Export to PDF

Bill Altmann February 26, 2018

I am using the Recently Updated macro on my Confluence page. I have selected a space and a label, and added that label to each of the pages in the space (about 12 pages).

When I show the Confluence page, I see a nice table, listing the author and last-published date for each page marked with the label.

When I export this set of pages to PDF, including the 'main page' with the inserted macro (using Space Tools), I see in place of the macro's table only an error:

error rendering macro "recently-updated-dashboard" : null

Why does this not work?

What I really want is to retrieve the "last published" dates from all the pages in my suite of export-to-PDF pages, in a table or in the footer of each page produced by each such page. It's important to me to know - in the PDF - the modified dates for the content, since Confluence does not have a "Revision" specifier that I can find. {I realize that Confluence is not a Document Management System, but when making a PDF - and especially when printing a PDF on paper - it's important for the reader and the Support person to know the "Revision" of the material.}

I am using Atlassian Cloud.

2 answers

1 vote
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

I am not sure why it doesn't work - it doesn't work for me either. So I opened a bug for the development team to get to the bottom of it: Error rendering macro 'recently-updated-dashboard' in space PDF export

Does the user macro offered by Jan Orlandini on the Community work for your use case?PDF export: Include page version number / history and date of print

Bill Altmann February 27, 2018

I do not understand how to use the 'source code' he lists, for a macro.

If I need to build this as a User Macro, I need to get admin access, which I do not have. Do you recommend to venture into building one's own macros? The cost of marketplace macro offerings seems open-ended, as our company grows.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

For more on user macros please see Writing User Macros. It shows where to put the code in the Confluence UI.

Please check whether it looks like a reasonable learning curve and decide whether to start developing user macros based on your comfort level. Marketplace solutions tend to be more powerful, where user macros can be very focussed. As you hinted, the ability to create your own macros could save money as your company grows.

Does your team have a staging instance where you could experiment with your macros and be granted more permissions than on Production? That would be a way to practice without making your Confluence admins too nervous.

Bill Altmann February 27, 2018

Apparently 'user macro is only available for server' not for cloud. is this true?

See https://community.atlassian.com/t5/Answers-Developer-Questions/Creating-User-Macros-in-Confluence/qaq-p/477369

What does 'restricted function' mean? Available to admins or to no one?

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

Oh Bill, I saw you were on Cloud when I created the bug but forgot when I made the user macro recommendation. I don't like to bear unpleasant news but it's true that user macros are a restricted function in Cloud.

I encourage you to add your comments and vote to  Error rendering macro 'recently-updated-dashboard' in space PDF export to emphasize your use case.

Cloud does include CSS customization for PDF exports, I do not know how to pull version info with CSS, however. I will have to defer to the rest of the Community.

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

Oops! You posted while I was typing - restricted functions in Cloud are altogether unavailable on the Cloud platform.

Bill Altmann February 27, 2018

Too bad.

Do you know the reason for the restricted function on Cloud for user macros?

Is there any way to capture the XML output from the "Export to PDF" before it goes to through the CSS style sheet phase? What I really want is to understand the details of the XML being created by Confluence when exporting, so that I can add to the supported CSS style sheet when exporting, and control more of the pages.

 

I see this list of restrictions:
https://confluence.atlassian.com/confcloud/restricted-functions-in-confluence-cloud-734070955.html?_ga=2.79204820.1377732552.1519669824-1972884014.1516129034

 

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

User macros are not supported in Cloud because they can introduce unsupportable configurations.

I do not know of a mechanism that would intercept the conversion to PDF before the styles are applied.

There are quite a few PDF export utilities on the Atlassian Marketplace: PDF Export Add-ons Perhaps one of these would suit your case.

0 votes
Bill Altmann February 27, 2018

I created a new space -  a completely new space - named "Staging Space".

My admin gave me permissions there that I don't have on our "production" space.

I created a page on the Staging Space, and entered onto it the Recently Updated macro.

I entered "Staging Space" in the 'Spaces' field of the macro. I entered 'page' in the 'type' field, and the same label in the 'label' field that I used in the original space's page's Recently Updated macro (the beginning of this chat).

So, now I have one new page in a new space, and on that page I have the Recently Updated macro, specifying the name of the new space only.

Why, on this new page, do I see the same extensive list of recently updated pages from the original space? I expected to see only the one page listed.

(In the last screen grab below, the red area is only there to obscure the page details. You may see that the macro lists many pages as 'recently updated'.)

Screen Shot 2018-02-27 at 11.18.27 AM.pngScreen Shot 2018-02-27 at 11.18.50 AM.pngScreen Shot 2018-02-27 at 11.19.19 AM.png

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

I got the same behavior on my test instance - I found this bug report: recently-updated-dashboard macro does not allow exclusion of spaces Feel free to comment or vote on it to provide feedback to the development team.

Bill Altmann February 27, 2018

As I add new pages to the new space, they are added to the Recently Updated macro output list in the "My Spaces" column. There does not seem to be any filtering to respect the 'Spaces' value I put in the field in the macro - it's listing all the pages I've recently updated.

Bill Altmann February 27, 2018

We're doing great today, huh? More bugs?

Maybe that bug report you point to is not very effective, since it's been open since 2009 and commented on most recently in 2010. :-(

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 27, 2018

Please refer to our Bug Fixing Policy for information on what makes a bug report effective. Your input on the bug actually adds to the impact.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events