Hi,
I'm getting the following error in my Atlassian Connect add-on, created after the Java Play tutorial:
Uncaught ReferenceError: aui is not defined
Here is the stacktrace (the source delivered by the CDN is minified):
aui.js:5 r aui.js:5 t aui.js:5 (anonymous function) aui.js:5 v.extend.each jquery.min.js:2 v.fn.v.each jquery.min.js:2 AJS.responsiveheader.setup aui.js:5 l jquery.min.js:2 c.fireWith jquery.min.js:2 v.extend.ready jquery.min.js:2 A jquery.min.js:2
If you remove the .aui-header element below, no error is produced. Do we miss some value like data-aui on the header element?
You can reproduce by creating a simple index.html file an opening it in a browser (python -m SimpleHTTPServer 8002 to serve the current directory):
<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Play SQL</title> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/aui/5.4.3/aui/css/aui.css" media="all"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/aui/5.4.3/aui/js/aui.js"></script> </head> <body> <header> <nav class="aui-header"> <h1>Look in the console</h1> </nav> </header> </body></html>
Thank you!
Community moderators have prevented the ability to post new answers.
I haven't run your code but try adding aui soy templates to your page. The `aui` variable is the namespace for all the soy templates.
Try adding this to the head (adding it before aui.js may be needed):
<script src="//cdnjs.cloudflare.com/ajax/libs/aui/5.4.3/aui/js/aui-soy.js"></script>
Eh oui! Of course! It's marked optional on the AUI docs, but obviously we need it for most features. Thanks very much Wojciech!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did not expect that and it just affected my Atlassian Connect plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, when I put the question up on Answers, I was sure it would happen to other people too. Glad it helped.
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.