Getting ReferenceError AP is not defined

Our problem occurs in Jira and is more than 2 years old. It has nothing to do with new Confluence editor.

I will update the DEVHELP ticket with more information.

Ours is not specific to the new confluence editor, but appears related to loading the script from the new cdn url, possibly specific to certain customer network topologies.

These could all be unique issues, but the title of this post at least matches the error we are seeing :slight_smile:

2 Likes

If you are using any script file and getting “Uncaught ReferenceError:” which means ‘x’ is either a variable or a method which you are trying to use before declaring it using var keyword. This means that there is a non-existent variable referenced somewhere. This variable needs to be declared, or you need to make sure it is available in your current script or scope otherwise , it will endup throwing this ‘x’ is not defined error . This usually indicates that your library is not loaded and JavaScript does not recognize the ‘x’.

To solve this error: Load your library at the beginning of all your scripts.

There can be multiple other reasons for this issue:

  • Path to CDN library you included is not correct
  • The library file is corrupted
  • Working offline
  • Conflict with Other Libraries

@lingmaaki,

The AP is an object in the Atlassian library, and the problem is intermittent.