Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

AUI: "aui is not defined"

Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2014

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!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
wurbanski
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2014

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>

Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2014

Eh oui! Of course! It's marked optional on the AUI docs, but obviously we need it for most features. Thanks very much Wojciech!

Robert Massaioli _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 30, 2014

Did not expect that and it just affected my Atlassian Connect plugin.

Adrien Ragot 2
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2014

Yes, when I put the question up on Answers, I was sure it would happen to other people too. Glad it helped.

TAGS
AUG Leaders

Atlassian Community Events