OzFlyer Posted January 11, 2018 Report Posted January 11, 2018 Fix the last post problem with "Add Airport" its now back to being in a popup window but still will not fetch any data. Quote
ATACEO Posted March 2, 2018 Report Posted March 2, 2018 (edited) Hello all, I am new to this and am having an issue with the add new Airport and am trying to follow this thread. However in first post it says "1) Go to your local.config.php / app.config.php to change your phpvms_api_server" I have changed the app.config.php but I do not see anything related to phpvms_api_server in the local.config.php. That line is it supposed to be added to the local.config.php and if so where should it be added? Ok UPDATE: I have added the code to local.config.php and as OzFlyer said it is still not fetching any data when adding New Airport and ICAO code. Any help would be greatly appreciated. Thank you for your time and understanding Edited March 2, 2018 by ATACEO Quote
web541 Posted March 3, 2018 Report Posted March 3, 2018 22 hours ago, ATACEO said: Hello all, I am new to this and am having an issue with the add new Airport and am trying to follow this thread. However in first post it says "1) Go to your local.config.php / app.config.php to change your phpvms_api_server" I have changed the app.config.php but I do not see anything related to phpvms_api_server in the local.config.php. That line is it supposed to be added to the local.config.php and if so where should it be added? Ok UPDATE: I have added the code to local.config.php and as OzFlyer said it is still not fetching any data when adding New Airport and ICAO code. Any help would be greatly appreciated. Thank you for your time and understanding The local.config.php doesn't need to be changed too much, but rather a few other files. Have you followed the tutorial here? https://www.virtualairlines.eu/index.php/Blog Quote
ATACEO Posted March 3, 2018 Report Posted March 3, 2018 web541, Yes I have followed this to a "T" Have checked it and double checked it. Quote
mischka Posted March 4, 2018 Author Report Posted March 4, 2018 12 hours ago, ATACEO said: web541, Yes I have followed this to a "T" Have checked it and double checked it. Can you please PM me with the name of your VA so I can check in the logs if you are actually reaching the server, and we can take it from there Quote
Michael2015 Posted March 4, 2018 Report Posted March 4, 2018 (edited) this still doeesnt work as i have followed everything to the bone and i get all the new fields but still doesn't fetch the Airport http://prntscr.com/imo2dz Edited March 4, 2018 by Michael2015 Quote
ATACEO Posted March 4, 2018 Report Posted March 4, 2018 Ok I have was using phpvms v2 and now I have uploaded v 5.5.2 and it works sort of. Now when I enter an Airport ICAO code and hit lookup the popup goes away and then I get this message "Some fields were blank!" and nothing addded. Quote
Michael2015 Posted March 4, 2018 Report Posted March 4, 2018 well i get nothign mate using phpvms 5x Quote
ATACEO Posted March 4, 2018 Report Posted March 4, 2018 9 minutes ago, Michael2015 said: well i get nothign mate using phpvms 5x Yeah mine doesn't fetch anything either. I acts like it but then I get the error message posted above. Does your pop-up box go away after you click on the "Look Up" button? Quote
Michael2015 Posted March 4, 2018 Report Posted March 4, 2018 think when you change these nothing works i would maybe make a back up Quote
HighFlyerPL185 Posted October 18, 2020 Report Posted October 18, 2020 also followed this to a "T" and getting Fetching Airport Data on Chrome 😕 Quote
Moderators Parkho Posted May 30 Moderators Report Posted May 30 function lookupICAO() { var icao = $("#airporticao").val(); if (icao.length != 4) { $("#statusbox").html("Please enter the full 4 letter ICAO"); return false; } $("#statusbox").html("Fetching airport data..."); $("#lookupicao").hide(); var url = "https://virtualairlines.eu/airports.php?icao=" + icao + "&callback=?"; console.log("URL: " + url); $.ajax({ url: url, dataType: "jsonp", // Specifies that the request is for JSONP success: function(data) { console.log("Data received: ", data); if (!data.airports || data.airports.length === 0) { $("#statusbox").html("Nothing found. Try entering the full 4 letter ICAO"); $("#lookupicao").show(); return; } $.each(data.airports, function(i, item) { console.log("Processing item: ", item); $("#airporticao").val(icao); $("#airportname").val(item.name); $("#airportcountry").val(item.countryName); $("#airportlat").val(item.lat); $("#airportlong").val(item.lng); $("#fuelprice").val(item.jeta); $("#statusbox").html(""); $("#lookupicao").show(); }); }, error: function(jqxhr, textStatus, error) { var err = textStatus + ", " + error; console.error("Request Failed: " + err); $("#statusbox").html("Error fetching data. Please try again."); $("#lookupicao").show(); } }); return false; } Change your function to this, it's been tested and working on both Chrome and Firefox Quote
Administrators ProAvia Posted May 30 Administrators Report Posted May 30 9 hours ago, Parkho said: function lookupICAO() { var icao = $("#airporticao").val(); if (icao.length != 4) { $("#statusbox").html("Please enter the full 4 letter ICAO"); return false; } $("#statusbox").html("Fetching airport data..."); $("#lookupicao").hide(); var url = "https://virtualairlines.eu/airports.php?icao=" + icao + "&callback=?"; console.log("URL: " + url); $.ajax({ url: url, dataType: "jsonp", // Specifies that the request is for JSONP success: function(data) { console.log("Data received: ", data); if (!data.airports || data.airports.length === 0) { $("#statusbox").html("Nothing found. Try entering the full 4 letter ICAO"); $("#lookupicao").show(); return; } $.each(data.airports, function(i, item) { console.log("Processing item: ", item); $("#airporticao").val(icao); $("#airportname").val(item.name); $("#airportcountry").val(item.countryName); $("#airportlat").val(item.lat); $("#airportlong").val(item.lng); $("#fuelprice").val(item.jeta); $("#statusbox").html(""); $("#lookupicao").show(); }); }, error: function(jqxhr, textStatus, error) { var err = textStatus + ", " + error; console.error("Request Failed: " + err); $("#statusbox").html("Error fetching data. Please try again."); $("#lookupicao").show(); } }); return false; } Change your function to this, it's been tested and working on both Chrome and Firefox While you replied to a 3 year old post to a 2 year old prior post, a better solution is: At least this will work as long as the phpVMS airport lookup API is up. This phpVMS airport lookup API is the same one in use for phpVMS v7 - and has been adapted to work with phpVMS v5. Quote
Moderators Parkho Posted May 30 Moderators Report Posted May 30 Well you're right the post is 3 years old and I came across it today. I think it's best if we close the unsolved old posts so people like me wouldn't dare to reply to them so late. Thanks for the update anyways. Quote
Administrators ProAvia Posted May 30 Administrators Report Posted May 30 Not sure if it's practical or worth the time to go thru all the v2/v5 posts to lock unsolved ones. New users should be using phpVMS v7 - and old users have usually solved their issues even if they don't post their resolution. Based on increasing issues that v2/v5 users are experiencing (mostly do to shared hosting updates), it's probably time to move on to v7. In any case, as long as phpVMS v7 airport lookup is working, the above update to the v5 files (via updated VACentral API update) should allow the airport lookup to work. Not so much using the "virtualairlines.eu" website airport lookup as the website is sometimes unreachable and the OP author hasn't been on this forum in over 4 years. Quote
Moderators Parkho Posted May 31 Moderators Report Posted May 31 Yeah, I am maintaining a few airlines and they're not willing to move on to v7. Besides there are not many developers for v7 and admins can't do simple tasks on their own as V7 is pretty complex for them. 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.