Forge Macro in Page Properties Report
Asked by Mohammad Zaman:

Hello,

I have Page Properties Report macros set up to display a list of pages. Within these pages, I've integrated custom macros developed with Forge and UI Kit.

**A single Standalone page: Macros work fine (first 4 rows)**

![standalone-page.png](/t5/image/serverpage/image-id/308472i03B13C90E6C1F4BC/image-dimensions/161x253?v=v2 "standalone-page.png")

**Errors:**

<br />

As you saw above, the macros work fine in any standalone page, but displays error in the **Page Properties Report**(see the image below).

![PagePropertiesReport.png](/t5/image/serverpage/image-id/308473i4F98C56FD139E5CF/image-size/large?v=v2&px=999 "PagePropertiesReport.png")

<br />

**There are 3 things happening in the image above.**   

**1.** The first error occurred in the 'Test CreatedBy' column, where the 'we don't have a way to export this macro' error was encountered due to the usage of UI Kit 2. Interestingly, the macro works fine and displays the value 'Hello World (UI Kit 2)' on standalone pages.  

**2.** The second issue arises with errors in the TestCreationDate and TestLastModifiedDate columns, both utilizing Forge macros with UI Kit. While these macros function correctly on standalone pages, they fail to display properly within the Page Properties Report.  

I've developed three separate components in three different JSX files and specified them in the **`manifest.yml`** file. To insert these macros into pages, I use a forward slash followed by the macro name or title. This allows the page to display the values generated by these macros..

<br />

.![jsx_files.png](/t5/image/serverpage/image-id/308474i9AD01C90FE3F9116/image-size/large?v=v2&px=999 "jsx_files.png")![manifest.png](/t5/image/serverpage/image-id/308475i5DBBE9C2A54D7E57/image-dimensions/375x253?v=v2 "manifest.png")  

<br />

**3.** This is an interesting discovery: none of the approaches worked within the Page Properties Report Macro except for this specific method. By copying the code from `creationDate.jsx` and pasting it into the `index.jsx` file, the macro successfully displays values both on standalone pages and within the Page Properties Report Macro..  

Question:

**1. how do I fix the first error if i want to use UI kit2 ?**

**2 \& 3) Why is it that creating multiple macros in JSX and defining them in the `manifest.yml` file as macro doesn't function properly within the Page Properties Report Macro, but does work when solely defined in `index.jsx`?**

**Do I have to create a separate forge app with source code in index.jsx, and then deploy and install them?**   

If i completely remove main: index.js from package.json and keep the other file , i get a ![package_json.png](/t5/image/serverpage/image-id/308476i37B8595E2A6C0E8B/image-dimensions/270x74?v=v2 "package_json.png")  
different error: **We've Encountered an issue exporting this macro. Please Try exporting this page again later.**

Thanks in advanced.


Answers:
author: Wolfgang LANDES
body: [@Mohammad Zaman](/t5/user/viewprofilepage/user-id/5205226)

I just wanted to let you know that I am facing the same problem.

Migrated an custom macro to UI Kit 2 (now UI Kit) and it worked fine on the individual pages. But breaks on the page properties report.

Any updates from Atlassian on this?


Tags: cloud

confluence-cloud