I'm developing an Atlassian Connect add-on for confluence. It is a static add-on. It has a dynamic content macro that loads external content. My add-on works in normal page view but I'm getting 'Uncaught ReferenceError: AP is not defined' error in macro preview window and in page preview mode. On line 8 of following attached code. Note that this is not my code. Other than preview, macro edit window works fine. I'm sure that all.js is loaded from host server, otherwise macro would not work in normal page view mode too. Is there any idea why I'm getting this error? Thanks.
//If the are the top frame (Confluence) if(window.top === window) { _AP.addonOriginMap = iFrameData.addonOriginMap || {}; require(['connect-host', 'ac/cookie', 'ac/env', 'ac/inline-dialog', 'ac/dialog', 'ac/messages', 'ac/request', 'ac/history'], function(host){ host.create(iFrameData); }); } else { //If we are a plugin frame AP.require('_create-inner-frame', function(createInnerFrame) { createInnerFrame(iFrameData); }); }
Community moderators have prevented the ability to post new answers.
Looks like its a bug:
I'm working on a Confluence macro as well and I'm getting the same error. My macro worked fine before but now this error is popping up. It might be a bug on Atlassian's side.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.