SkiesTheLimit Posted July 3, 2013 Report Posted July 3, 2013 Hello all, I've read numerous post of No Route Passed and instead of hijacking one I come here to make my post. Now, the no route past is because of a skin I'm working on at the moment - the reason it is doing such I believe is because of a JS error. I'm not quite the JS wiz, but I believe it is the TypeError in my function.js I will post my function.js and screenshot of error and maybe someone can assist me in fixing and eliminating no route passed error thank you below is the screenshot and code and below is code for function.js where problem is occuring: scrolling = false; scaleSpacing = scale+spacing; $page.current = ""; $page.layout = "full"; $page.smallWidth = -1; $group.count = $group.titles.length; $group.current = -1; $arrows.rightArray = []; mostRight = 0; mostDown = 0; tileContainer = ""; zoomScale = 1; $hashed.parts = []; $hashed.get = []; $hashed.doRefresh = true; submenu = []; $group.spacing = $group.spacingFull.slice(); // clone arrays /*Replace spaces by hyphens. ( - ) for TEXT to URL*/ String.prototype.stripSpaces = function(){ return this.replace(/\s/g,"-")} /*Replace hyphens by spaces, for URL to TEXT */ String.prototype.addSpaces = function(){ return this.replace(/-/g," ")} /*Case insensitive array search and returns the index of that search in the array */ inArrayNCindex = function(val,array){var i=array.length;val=chars(val.toLowerCase());while (i--){if(chars(array[i].toLowerCase())==val){return i;}}return -1;} inArrayNCkey = function(val,array){val=chars(val.toLowerCase());for(var key in array){if(chars(array[key].toLowerCase())==val){return key;}}return -1;} /* Returns the case sensitive index after a case insensitive index search */ strRepeat = function(cnt,char){var a = [],x = cnt + 1;while (x--) { a[x] = '';}return a.join(char);} /*PHP strtr equivalent*/ chars = function(r){ r = r.replace(new RegExp("[à áâãäåæ]", 'g'),"a"); r = r.replace(new RegExp("ç", 'g'),"c"); r = r.replace(new RegExp("[èéêë]", 'g'),"e"); r = r.replace(new RegExp("[ìÃîï]", 'g'),"i"); r = r.replace(new RegExp("ñ", 'g'),"n"); r = r.replace(new RegExp("[òóôõöðø]", 'g'),"o"); r = r.replace(new RegExp("Å“", 'g'),"oe"); r = r.replace(new RegExp("[ùúûü]", 'g'),"u"); r = r.replace(new RegExp("[ýÿ]", 'g'),"y"); r = r.replace(new RegExp("Å¡", 'g'),"s"); r = r.replace(new RegExp("ž", 'g'),"z"); r = r.replace(new RegExp("[Þ]", 'g'),"b"); r = r.replace(new RegExp("ß", 'g'),"ss"); r = r.replace(new RegExp("Æ’", 'g'),"f"); return r; }; /* Init the tile-pages move functions */ $.extend($group, { goTo: function(n){ if($page.current != "home"){ window.location.hash = "&"+$group.titles[n].toLowerCase().stripSpaces(); $show.prepareTiles(); } $tileContainer = $("#tileContainer"); scrolling = true; if(n<0){n=0}; $group.current = n; $tileContainer.children(".navArrows").hide(); if($page.layout=="column" || $group.direction == "vertical") { $("html, body").animate({"scrollTop":$("#groupTitle"+n).offset().top},scrollSpeed,function(){ document.title = siteTitle+" | "+$group.titles[$group.current]; if (history.pushState) { window.history.replaceState("", "", "#&"+chars($group.titles[$group.current].toLowerCase()).stripSpaces()); } setTimeout("scrolling = false",100); $arrows.place(300); $events.tileGroupChangeEnd(); }); }else{ $("html, body").animate({"scrollLeft":getMarginLeft(n)*zoomScale},scrollSpeed,function(){ document.title = siteTitle+" | "+$group.titles[$group.current]; if (history.pushState) { window.history.replaceState("", "", "#&"+chars($group.titles[$group.current].toLowerCase()).stripSpaces()); } setTimeout("scrolling = false",100); $arrows.place(300); $events.tileGroupChangeEnd(); }); } $mainNav.setActive(); setTileOpacity(); scrollBg(); $events.tileGroupChangeBegin(); }, goLeft: function(){ if($group.current>0){ $group.goTo($group.current-1); }else{ $group.bounce(-1); } }, goRight: function(){ if($group.current+1 < $group.count){ $group.goTo($group.current+1); }else{ $group.bounce(1); } }, bounce: function(s){ //gives a bounce effect when there are no pages anymore, s = side: -1 = left, 1 = right if(!scrolling){ scrolling = true; var t; if(s>0){t = "-=40"}else{t="+=40";} $('#tileContainer').animate({'margin-left': t}, 150).animate({'margin-left': 0}, 150,function(){ scrolling = false }); } } }); /*Calculates the margin left for tiles/scrolling */ getMarginLeft=function(l){ var s=0; for(i=0;i<l;i++){ if($group.spacing.length>i){ // if in array (to prevent errors); s+=$group.spacing[i]; }else{ s+=$group.spacing[$group.spacing.length-1]; // add last defined groupSpacing } } return s*scaleSpacing; } /* Place the arrows on the right place*/ $.extend($arrows,{ place:function(speed){ if($group.direction=="horizontal"){ if($page.layout == "full"){ $("#tileContainer").children(".navArrows").hide(); if($group.current!=0){ $("#arrowLeft").css('margin-left',getMarginLeft($group.current)-40).fadeTo(speed,0.5); } if($group.current!=($group.count-1)){ $("#arrowRight").css('margin-left',$arrows.rightArray[$group.current]+12).fadeTo(speed,0.5); } }else if($page.layout == "small"){ $("#tileContainer").children(".navArrows").hide(); if($group.current!=0){ $("#arrowLeft").css('margin-left',getMarginLeft($group.current)-40).fadeTo(speed,0.5); } if($group.current!=($group.count-1)){ $("#arrowRight").css('margin-left',getMarginLeft($group.current)+scaleSpacing*2+scale+12).fadeTo(speed,0.5); } }else{ $("#tileContainer").children(".navArrows").hide(); } $events.arrowsPlaced(); } } }); /* Hover FX for nav arrows*/ $(document).ready(function(){ $(".navArrows").bind("mouseover",function(){ if(!scrolling){ $(this).stop(false,true).fadeTo(300,1); } }).bind("mouseleave",function(){ if(!scrolling){ $(this).stop(false,true).fadeTo(300,0.5); } }) }); /* Scrolls background, if needed */ scrollBg = function(){ if($page.layout != "column" && device=="desktop" && $group.direction == "horizontal"){ /* ONLY IN FULL VERSION */ $events.bgScroll(); } } /* Set width so we can scroll to last tilegroup */ fixScrolling = function(){ var t; if($page.layout != "column" && $group.direction == "horizontal"){ t = parseInt(($("#groupTitle"+($group.titles.length-1)).css("margin-left")).replace("px",""))/zoomScale+25; t +=$("#headerCenter").width()+($(window).width()-$("#headerCenter").width())/2; }else{ t=scaleSpacing+scale+10; } $events.fixScrolling(); $("#tileContainer").width(t).height(mostDown); } recalcScrolling = function(){ mostDown = 0; $("#tileContainer").children(".tile").each(function(){ var thisRight = parseInt($(this).css("margin-left"))+$(this).width(); // GLOBAL if(thisRight>mostRight){ mostRight=thisRight; } var thisDown= parseInt($(this).css("margin-top"))+$(this).height(); if(thisDown>mostDown){ mostDown=thisDown; } }) $events.recalcScrolling(); } /* To create subnav */ $subNav={ make: function(){/* Generates the subnav- menu, makes sub-Navigation items */ $("#subNavWrapper").children("#subNav").remove(); $("#subNavTemp").children().prependTo("#subNavWrapper"); $("#subNavTemp").remove(); $("#subNav").children("a").each(function(){ $(this).attr("href",$(this).attr("href").replace("?p=","#!/")); }); $subNav.setActive(); $events.subNavMake(); }, /* highlights current sub-navigation-item */ setActive: function(){ var $nav = $("#subNav"); $nav.children("a").removeClass("subNavItemActive"); $nav.children('[href$="'+$hashed.parts[0]+'"]').addClass("subNavItemActive"); $events.subNavActive(); } } /* Makes main (top) nav */ $mainNav={ init: function(){ $("nav").on("click","a",function(){ $group.goTo(parseInt($(this).attr("rel").replace("group",""))); }); $events.mainNavInit(); }, setActive: function(){ var $nav = $("nav") $nav.children("a").removeClass("navActive"); $nav.children("[rel='group"+$group.current+"']").addClass("navActive"); $events.mainNavActive(); }, set:function(w){/* Used to manually select the highlighted menu */ var $nav = $("nav") w = $.trim(w.toLowerCase()); $nav.children("a").removeClass("navActive"); $nav.children("a").each(function(){ if($.trim($(this).text().toLowerCase()) == w){ $(this).addClass("navActive"); } }); $events.mainNavSet(); } } /*For smaller column mainnav */ $(document).on("click","#navTitle",function(){ if($("nav>a").css("display") == "none"){ $("nav>a").css("display","block"); }else{ $("nav>a").css("display","none"); } }); /* Creates a nice link according to the required page */ makeLink = function(lp){/* To make valid links */ if(lp.substr(0,9) == 'gotolink:'){ return lp.substr(9); } if(lp==""){ return ''; } if(lp.substr(0,7) == "http://" || lp.substr(0,8) == "https://" || lp.substr(0,1) == "/" || lp.substr(0,1) == "#" || lp[lp.length-1] == "/") { return lp; } $events.makeLink(); if(typeof pageTitles[lp] == "undefined" ){ return "#!/url="+chars(lp.toLowerCase().stripSpaces()); }else{ return "#!/"+chars(pageTitles[lp].toLowerCase().stripSpaces()); } } /* For menu / tile links, generates the link + href + target attribute if needed */ makeLinkHref = function(lp){/* To make valid links */ var t = ''; if(lp.substr(0,9) == 'external:'){ t=" target='_blank' "; lp = lp.substr(9); } $events.makeLinkHref(); if(lp == ""){ return ""; } return t+" href='"+makeLink(lp)+"' "; } /* Will be called on page load to transform urls to nice urls */ transformLinks = function(){ $("a[rel=metro-link]").each(function(){ $(this).attr("href",$(this).attr("href").replace("?p=","#!/")); }); $events.transformLinks(); } /*Fired when clicked on any link*/ $(document).on("click","a",function(){ if(this.href==window.location.href){ // if we're already on the page the user wants to go $(window).hashchange(); // just refresh page }; }); Thank you in advance. Chase Quote
SkiesTheLimit Posted July 3, 2013 Author Report Posted July 3, 2013 *UPDATE* I had two JQuery includes, when I delete the new (1.9.2) include the site fails to display the frontpage effects but when i include (1.9.2) and (1.42) no route passed when i include just (1.9.2) no route passed. anyone? Quote
Strider Posted July 3, 2013 Report Posted July 3, 2013 This usually means a JS file is in the wrong place. Quote
SkiesTheLimit Posted July 3, 2013 Author Report Posted July 3, 2013 Should all Javascript includes be in the code before the CSS includes? Quote
SkiesTheLimit Posted July 3, 2013 Author Report Posted July 3, 2013 Route map and ACARs map are not showing up either, any suggestions? Quote
SkiesTheLimit Posted July 3, 2013 Author Report Posted July 3, 2013 Here is the <head> section of my layout.tpl For some reason when I add include corehead header thing it breaks it so the page doesn't load even if there is a jquery include in the corehead. so i leave corehead out frontpage works but no route passed on schedules page. i even tried deleting jquery include in layout adding the new 1.9.1 include in corehead and delete the thing in my layout and then echo corehead still no avail. Nothing works the only thing that works is including jquery-1.9.1 then not including corehead on the layout.tpl which renders adding to bid useless. any guidances? here is my layout.tpl head <html> <head> <style> @font-face { font-family: american; src: url(http://aalv.net/americansans-light.ttf); } @font-face { font-family: murica; src: url(http://aalv.net/murica.ttf); } </style> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Description" content="Easily create Windows 8 Metro UI-style websites with this templating framework. Many features like live-tiles, slideshows and sidebars."/> <meta name="keywords" content="template, windows 8, website, design, download, metro ui, metro template"/> <meta name="viewport" content="width=300, target-densitydpi=150, initial-scale=0.999"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title><?php echo $page_title ?></title> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'> <link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/css/layout.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/css/nav.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/css/tiles.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/themes/theme_default/theme.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/accordion/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/autozoom/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/lightbox/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/panels/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/plugintemplate/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileflip/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileslide/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileslidefx/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileslideshow/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tiletemplate/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tiletwitter/plugin.css" /><link rel="stylesheet" type="text/css" href="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileweather/plugin.css" /><style> html{background-color:#F0F0F0;} #bgImage { position:fixed; top:0; left:0; z-index:-4; min-width:115%;min-height:100%; -webkit-transition:margin-left 450ms linear; -moz-transition:margin-left 450ms linear; -o-transition:margin-left 450ms; -ms-transition:margin-left 450ms; transition:margin-left 450ms; } .tile{ -webkit-transition-property: box-shadow, margin-left, margin-top; -webkit-transition-duration: 0.25s, 0.5s, 0.5s; -moztransition-property: box-shadow, margin-left, margin-top; -moz-transition-duration: 0.25s, 0.5s, 0.5s; -o-transition-property: box-shadow, margin-left, margin-top; -o-transition-duration: 0.25s, 0.5s, 0.5s; -ms-transition-property: box-shadow, margin-left, margin-top; -ms-transition-duration: 0.25s, 0.5s, 0.5s; transition-property: box-shadow, margin-left, margin-top; transition-duration: 0.25s, 0.5s, 0.5s; } </style><script type='text/javascript'>var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-30159978-1']);_gaq.push(['_trackPageview']);(function(){var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script> <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://aalv.net/Dev/lib/skins/V4_lite/js/html5.js"> <script src="http://code.jquery.com/jquery-2.0.0b2.js"></script> <script src="http://aalv.net/Dev/lib/skins/V4_lite/js/html5.js"> <script src="http://code.jquery.com/jquery-2.0.0b2.js"></script> <script type="text/javascript">window.jQuery || document.write('<script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/js/jquery191.js"><\/script>')</script> <script type="text/javascript" language="javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/js/plugins.js"></script> <script> scale = 145; spacing = 10; theme = 'theme_default'; $group.titles = ["Home","Operations","Crew"]; $group.spacingFull = [4,4,4]; $group.inactive.opacity = "1"; $group.inactive.clickable = "1"; $group.showEffect = 0; $group.direction = "horizontal"; mouseScroll = "1"; siteTitle = 'American Virtual'; siteTitleHome = 'Home'; showSpeed = 400; hideSpeed = 300; scrollSpeed = 550; device = "desktop"; scrollHeader = "1"; disableGroupScrollingWhenVerticalScroll = ""; /*For background image*/ bgMaxScroll= "130"; bgScrollSpeed = "450"; /*For responsive */ autoRearrangeTiles = "1"; autoResizeTiles = "1"; rearrangeTreshhold = 3; hidePanelonclick = '1';pageTitles=new Array();pageTitles['typography.php'] = 'Typography';pageTitles['changelog.php'] = 'Changelog and Bugs';pageTitles['features.php'] = 'Features';pageTitles['about.php'] = 'About';pageTitles['tutorials.php'] = 'Docs and Tutorials';pageTitles['contact.php'] = 'Contact';pageTitles['download.php'] = 'Download';pageTitles['buytemplate.php'] = 'Buy Template';pageTitles['demo.php'] = 'Demo sites and examples';</script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/accordion/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/autozoom/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/lightbox/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/panels/desktop.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/plugintemplate/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileflip/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tilemedia/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileslide/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileslidefx/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileslideshow/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tiletemplate/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tiletwitter/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileweather/plugin.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/js/functions.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/js/main.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tilemedia/jquery.media.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tilemedia/jquery.metadata.js" /></script><script type="text/javascript" src="http://aalv.net/Dev/lib/skins/V4_lite/plugins/tileweather/jquery.simpleWeather-2.1.2.min.js" /></script> <noscript><style>#tileContainer{display:block}</style></noscript> </head> Quote
SkiesTheLimit Posted July 3, 2013 Author Report Posted July 3, 2013 FIXED IT USE JQUERY 1.8.2 AND THE NO ROUTES PASSED IS GONE AND FRONTPAGE WORKED Let us all sing, HALLEJUAH 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.