- edited description
"Uncaught ReferenceError: AP is not defined" in Macro Preview and Page Preview
This add-on works for normal page view, but in the macro preview or in the page preview it cause AP is not defined exception. I have attached the section causing the exception. it is "AP.require('_create-inner-frame', function(createInnerFrame) {" line below. Note that this is somewhere inside atlassian connect api, not the plugin code itself. I think something in newer connect api is not compatible. This add-on is also promoted as a sample add-on for connect developers so a lot of developers will face the same problem, like me :)
//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);
});
}
Comments (6)
-
reporter -
repo owner Thanks for this bug report Deniz! I'll try and look into that further.
@khanhfucius / @mstaas is this related to the iframes inside iframes issue that was discovered recently?
-
repo owner Ah yes, I found: https://groups.google.com/forum/#!topic/atlassian-connect-dev/ZXB6HOHtVO8
This is caused by: https://ecosystem.atlassian.net/browse/CE-606
-
repo owner - changed status to resolved
Resolved since this is not a problem with this add-on but will be fixed elsewhere.
-
Account Deactivated @robertmassaioli This is fixed by CE-606, The next release will include the fix.
-
reporter thanks everyone for fast response.
- Log in to comment