留言板

Basic html, Uncaught ReferenceError: AUI is not defined(…)

Miguel Pichipillán,修改在7 年前。

Basic html, Uncaught ReferenceError: AUI is not defined(…)

New Member 帖子: 4 加入日期: 16-10-28 最近的帖子
Hello everyone
The problem I have is the follow:
By Liferay i create a article, that have a video, from the webservice i get the article's content and i draw it in a basic html, loaded page give me this error "Uncaught ReferenceError: AUI is not defined(…)", i added all js related about AlloyUI but the problem continues.
Can anyone help me please!!!!
thumbnail
Kyle Joseph Stiemann,修改在7 年前。

RE: Basic html, Uncaught ReferenceError: AUI is not defined(…)

Liferay Master 帖子: 760 加入日期: 13-1-14 最近的帖子
Hi Miguel,
Can you post the shortest, simplest code that reproduces your issue? It'll be hard for us to help you without that information.

- Kyle
Miguel Pichipillán,修改在7 年前。

RE: Basic html, Uncaught ReferenceError: AUI is not defined(…)

New Member 帖子: 4 加入日期: 16-10-28 最近的帖子
Hi Kyle, thank for your help.

The Article's content is



<style type="text/css"></style><p>This is Sample Bulletin #1</p>  
<p> 
	</p><div class="liferayckevideo video-container" data-document-url="https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&amp;loop=1&amp;playlist=f0oYjWs6bNs&amp;playsinline=1&amp;controls=0&amp;showinfo=0&amp;enablejsapi=1&amp;modestbranding=2" data-height="300" data-poster="https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&amp;loop=1&amp;playlist=f0oYjWs6bNs&amp;playsinline=1&amp;controls=0&amp;showinfo=0&amp;enablejsapi=1&amp;modestbranding=2&amp;videoThumbnail=1" data-video-ogv-url="https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&amp;loop=1&amp;playlist=f0oYjWs6bNs&amp;playsinline=1&amp;controls=0&amp;showinfo=0&amp;enablejsapi=1&amp;modestbranding=2&amp;videoPreview=1&amp;type=ogv" data-video-url="https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&amp;loop=1&amp;playlist=f0oYjWs6bNs&amp;playsinline=1&amp;controls=0&amp;showinfo=0&amp;enablejsapi=1&amp;modestbranding=2&amp;videoPreview=1&amp;type=mp4" data-width="400"> <div class="ckvideo-no-id"></div> 
		<script type="text/javascript">

		AUI().use("aui-base", "aui-video",function(A) {
				var mediaId = A.guid();var mediaDivNode = A.one(".ckvideo-no-id");mediaDivNode.attr("id", mediaId);mediaDivNode.removeClass("ckvideo-no-id");var mediaConfig = {boundingBox: "#" + mediaId,height: 300,ogvUrl: "https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&loop=1&playlist=f0oYjWs6bNs&playsinline=1&controls=0&showinfo=0&enablejsapi=1&modestbranding=2&videoPreview=1&type=ogv",poster: "https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&loop=1&playlist=f0oYjWs6bNs&playsinline=1&controls=0&showinfo=0&enablejsapi=1&modestbranding=2&videoThumbnail=1",url: "https://www.youtube.com/embed/f0oYjWs6bNs?autoplay=1&loop=1&playlist=f0oYjWs6bNs&playsinline=1&controls=0&showinfo=0&enablejsapi=1&modestbranding=2&videoPreview=1&type=mp4",width: 400};new A.Video(mediaConfig).render();});
		</script> 
	</div> 
<p></p>



I add attached file with basic html (named hola.html)

Basic's html structure



    &lt; all script AlloyUI&gt;


   <content article>


</content>
thumbnail
Víctor Ponz,修改在7 年前。

RE: Basic html, Uncaught ReferenceError: AUI is not defined(…)

New Member 帖子: 14 加入日期: 14-12-3 最近的帖子
First of all, you don't have to include
<script src="http://yui.yahooapis.com/3.18.1/build/yui/yui-min.js"></script>
And leave only <script src="http://cdn.alloyui.com/3.0.1/aui/aui-min.js"></script>
This javascript library loads the necessary files when needed, so remove all the others aui scripts.
And change AUI by YUI
AUI().use("aui-base", "aui-video",function(A) {
YUI().use("aui-base", "aui-video",function(A) {

Hope it helps.