Macros loaded within a Page Properties Table don't load their JS sources

Ahmed Alaghbari June 26, 2019

The source JS file is never loaded when the macro is within a page properties report. This seems to be caused by the macro not being rendered immediately with the page and instead with the results of the report. For some reason, this causes the `#requireResource` of the `.vm` template to not fire.

 

I have tried to add a script tag to the template to perform the web resource call using:

AJS.loadWebResourceTemplates(moduleKey, resourceName);

However, it results in a 404 error as the request endpoint generated is not correct. When I compared it to the successfully called resource endpoint (in other pages without the Page Properties Table), I noticed that the generated request endpoint was missing a /random-alphanumeric-sequence-CDN/ .

 

I am not sure if there is another recommended way to load web resources from for macros within page properties report. Any suggestions are appreciated.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events