Jump to content

Routes not passing anymore, think it's jquery conflict


ahughes3

Recommended Posts

Hello All,

Discovered a problem on our site today. Our bids are not being passed. I've seen this already a lot on the forums and I've tried a number of things to fix it but it still persists so I'm hoping you geniuses (or is it Geni') can help.

I'll try and describe the problem as simply as poss.

I am using a skin I have developed and added bits too so I am fully expecting it to be a case of jQuery conflicts, be here goes.

When you click on "View Schedules" in the pilot centre, it returns the usual page, but there is no styling or PHPVMS headers or anything. If I look at the source code, it looks as if it is literally just the template with no header or meta tags or anything.

You can then select a departure airport ok and click find which will return a page of results.

The page of results then looks perfectly normal, with CSS styles and all the other PHPVMS bits.

The problem comes when I click on "add to bids". The next screen is when I get "no route passed".

What I have tried so far.

I have tried reorganising the jQuery scripts to see if it is an ordering issue.

I have tried deleting my skins jQuery script and just leaving PHPVMS default ones.

I have tried it the other way round and just leaving mine.

I have tried commenting out different scripts to see if that sorts it.

I have used the noConflict rule to try and see if that helps.

So far nothing has made any difference what so ever. Even when I remove what looks like the only additional jQuery item I've added.

So I'm stumped and need to call for back up :)

The site is www.virginatlanticvirtual.co.uk

Let me know if you want any source code pasted etc.

Waiting in anticipation....

Andy

Link to comment
Share on other sites

Something I neglected to mention, but had assumed it was irrelevant, I am running some addon modules for PHPVMS.

Charter Ops

Event Module

Live Map

Pilot Academy

Sim Brief (only added this today and the problem started before that)

Not sure how relevant it is but thought I'd mention it

Link to comment
Share on other sites

  • 2 months later...

Ok thought I'd repost this as it's still an issue. I've now tried coding out almost every piece of jquery and scripting that is acting on the page and I get no difference in results. the route search form is always returned without site formatting like it's lost connection to the css. Then when I search for routes, it gives me the list of routes as per normal. When I then click on "add to bid" I just get "no route passed".

Whilst it's not the end of the world as we use Smartcars, I still would like to get it working again as some of our pilots use kACARS and need to book via the website.

Any help anyone can give would be greatly appreciated. Is there any way to get hold of an error log somewhere? Might point me in the right direction a bit more.

Thanks

Link to comment
Share on other sites

  • Administrators

I believe that you are missing the jquery ui in your header, you have;

<script type="text/javascript" src="http://www.virginatlanticvirtual.co.uk/lib/skins/margo-full-width/js/jquery-1.11.2.min.js"></script>

but it should be

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>

Take a good look at the ending of what you should actually be loading for a file, unless you are trying to load jquery twice, which could also be an issue, either way the second link in your template is returning a 404 error.

Have you tried using it on the default crystal template? If it does not work there I am guessing you are getting the out of memory error in the background as it looks like you have a rather lengthy airport list which has to populate twice in that view. Looking at the source you have about 1180 airfields which is being populated twice so realistically it is nearly 2400. Try making a bunch inactive and see if the problem goes away.

The no route passed is definitely a javascript error somewhere but without being logged in and being able to try the function it would just be a guess.

Link to comment
Share on other sites

I believe that you are missing the jquery ui in your header, you have;

<script type="text/javascript" src="http://www.virginatlanticvirtual.co.uk/lib/skins/margo-full-width/js/jquery-1.11.2.min.js"></script>

but it should be

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>

Take a good look at the ending of what you should actually be loading for a file, unless you are trying to load jquery twice, which could also be an issue, either way the second link in your template is returning a 404 error.

Have you tried using it on the default crystal template? If it does not work there I am guessing you are getting the out of memory error in the background as it looks like you have a rather lengthy airport list which has to populate twice in that view. Looking at the source you have about 1180 airfields which is being populated twice so realistically it is nearly 2400. Try making a bunch inactive and see if the problem goes away.

The no route passed is definitely a javascript error somewhere but without being logged in and being able to try the function it would just be a guess.

I did have the original jquery library references in place, I'd switched them to see if it was the issue and just forgot to set them back, thanks for the nudge. Although it didn't make any difference to the problem sadly.

The airports issue is an odd one. Even in the crystal skin, when I click on "View schedules" it opens a plain white page with a form for searching. Each search element then has it's own dropdown box. I don't remember it being like that in the older versions. You simply had a single drop down box and you clicked on the element you want to search by which I assume then changed the content you saw in the dropdown. It does it on both my clean installation and the Virgin site. Simpilot, I am more than happy to give you access to the admin centre and web content if you wanted to take a nosey for yourself. :)

Give this a try -

<script>
jQuery.noConflict();
</script>

Put it after ALL libraries have been loaded. It would fix the multiple versions of jQuery problems that would result in the error you have.

I used the jQuery.noConflict(); in a couple of different places within the scripts themselves that I was trying to load. I think I also tried it on it's own but in front of all the other scripts I'm sure of it. Anyways, that's why the forums are so effective, your suggestion seems to have fixed the problem. I can now search and bid and the bid gets passed! :) Thanks a bunch.

I would still like to try and work out why my "search schedules" page is not showing the old, original page and instead just a blank page with the form on it. As you say SimPilot, it is then just returning all the results for all of the dropdowns.

Link to comment
Share on other sites

Give this a try -

<script>
jQuery.noConflict();
</script>

Put it after ALL libraries have been loaded. It would fix the multiple versions of jQuery problems that would result in the error you have.

Thank You ZumeWeb. Fixed the No Routes Problem for me! I appreciate it very much!

  • Like 1
Link to comment
Share on other sites

Ok I think I spoke to soon. The jQuery.noConflict at the end of all scripts has indeed fixed the "no routes passed" problem but it has created another one. I have a "latest news" banner at the top of my pages which is driven by jQuery. When I add the noConflict at the end, it breaks the news banner and if I include it within the script, but place the whole thing at the end of my scripts, it then won't pass the routes again.

I have tried placing the noConflict script inside, outside, before, after and also multiple methods for writing the noConflict script but it's always the same. Either the news doesn't work and the routes does, or the other way around.

The script that seems to be causing the problems is as follows:

jQuery(window).load(function(e) {
  jQuery("#bn1").breakingNews({
   autoplay :true,
   timer  :6000,
  });
});

and this is how my header looks:

<script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jQuery.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery-migrate-1.2.1.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/modernizrr.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/asset/js/bootstrap.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.fitvids.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/owl.carousel.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/nivo-lightbox.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.isotope.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/count-to.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.textillate.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.lettering.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.easypiechart.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.nicescroll.min.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.parallax.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/mediaelement-and-player.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/script.js');?>"></script>
   <script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/ajax.js');?>"></script>
   <script type="text/javascript" src="http://static.tsviewer.com/short_expire/js/ts3viewer_loader.js"></script>
<script type="text/javascript" src="<?php echo fileurl('/lib/skins/margo-full-width/js/jquery.appear.js');?>"></script>
   <!--[if IE 8]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
   <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

   <!-- SimBrief Script -->
<script type="text/javascript" src="<?php echo fileurl('lib/js/simbrief.apiv1.js');?>"></script>
<script>
jQuery(window).load(function(e) {
  jQuery("#bn1").breakingNews({
   autoplay :true,
   timer  :6000,
  });
});
</script>
   <script>
jQuery.noConflict();
</script>

Any suggestions greatly welcome. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...