Jump to content

Live Map Errors


KenG

Recommended Posts

  • Administrators

Did you check the console in google chrome to see if it shows any errors?

Did you check the error_log file to see if there are any errors there?

 

What version of phpVMS?

What version of PHP?

What version of MySQL or MariaDB?

What skin are you using?

What is the code for that page?

What are the last three or so items you changed on the site? If it worked before, chances are it is caused by something you recently did.

 

Link to comment
Share on other sites

Thank you very much for your reply:

 

Quote

Did you check the console in google chrome to see if it shows any errors?

 

I get 8x Devtools failed to parse sourcemap:

 

DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.preload.js.map
DevTools failed to parse SourceMap: chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/sourcemaps/onloadwff.js.map
DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.postload.js.map
DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.preload.js.map
DevTools failed to parse SourceMap: chrome-extension://hdokiejnpimakedhajhdlcegeplioahd/sourcemaps/onloadwff.js.map
DevTools failed to parse SourceMap: chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/include.postload.js.map
DevTools failed to parse SourceMap: https://discordapp.com/assets/5a61f8e3e63b7e93777f.js.map
DevTools failed to parse SourceMap: https://discordapp.com/assets/index.f7afda7848e99e6cf0ab.css.map 

 

I see on stackoverflow they recommend to download the missing map file and put it in the assets/lib directory.I have never had these in my assets directory before and it worked just fine. Is this really necessary and how would it help with the missing information in the table?

 

Quote

Did you check the error_log file to see if there are any errors there?

 

Yes there are errors from DirectoryIndex of image files. I don't think that would cause the table above the map to not display correctly.

 

Quote

What version of phpVMS?

 

David Clark's 5.5.2

 

Quote

What version of PHP?

5.5

 

Quote

What version of MySQL or MariaDB?

 5.7.29-cll-lve

 

Quote

What skin are you using?

CrazyCreative's Jet Set Basic https://www.crazycreatives.com/downloads/phpvms-theme-jetset-basic/

 

Manuel has not been monitoring his forums since December 2019 and his forums have become difficult to enter making you reset the password every time. So no help going back to the developer.

 

Quote

What is the code for that page?

 

Here is my entire front page from the /lib/skins/ 

 

I am thinking there is an issue with the scripts acars_map_row and acars_map_bubble. I think those are javascripts on the site just not sure what js files I might try replacing first. 

<?php $maintenance = AircraftMarketData::getaircraftinmaintenance(); ?>
<?php
if(!Auth::LoggedIn()) { ?>
			<div class="box">
			<h2>A Global Community...</h2>
			<P STYLE="font-size: 13pt; color:#183266">Elite Air Taxi is a non-profit, global community based organization, known as a 'virtual airline', that has been in existence since October the 24th of 2015. Elite Air Taxi creates an environment that offers individuals of all levels of expertise the opportunity to learn and enjoy a simulated Executive Business Aircraft experience. We all share a common passion for Executive aviation brand and an interest for flight simulation. We take pride in creating an experience that realistically represents the real-world Executive aviation and the vital role a pilot undertakes in a Private charter. Elite Air Taxi will be the breeding ground of tomorrow private pilots, as such will strive to instill the same professional image upon its members as the real-world Private charter companies has upon its own employees and customers.</p>
	<br>
<!-- <?php MainController::Run('News', 'ShowNewsFront', 1); ?> -->
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tbody>
    <tr>
      <td><center><img src="http://www.flyelite.net/images/bannerfleet.png" width="250" height="230" alt=""/></center></td>
      <td><center><img src="http://www.flyelite.net/images/sys.png" width="250" height="230" alt=""/></center></td>
      <td><center><img src="http://www.flyelite.net/images/far.png" width="250" height="230" alt=""/></center></td>
    </tr>
  </tbody>
</table>
<br>

</div>
<?php } else { ?>
<div class="box">
<h2><b>
<script type="text/javascript">

    var myDate = new Date();

    if (myDate.getHours() <= 5) {
        document.write("Up Early ");
    }
    else if(myDate.getHours() > 5 && myDate.getHours() <= 12){
        document.write("Good Morning ");
    }
	else if(myDate.getHours() > 12 && myDate.getHours() <= 17){
        document.write("Good Afternoon ");
    }
    else if (myDate.getHours() > 17 && myDate.getHours() <= 22) {
        document.write("Good Evening ");
    }
    else if (myDate.getHours() > 22 && myDate.getHours() <= 24) {
        document.write("Up Late ");
    }
    else
    {
        document.write("Welcome ");
    }
</script>

<?php echo Auth::$userinfo->firstname . ' ' . Auth::$userinfo->lastname . ' - ETX'. Auth::$userinfo->pilotid;?>!</b></h2>
<P STYLE="font-size: 13pt; color:#183266">Elite Air Taxi strives to provide a professional Business Aircraft environment for its pilots. If you have suggestions on enhancements, please use the Forum to make a post with your thoughts. Don't forget to check out the Events, as participation in those is the best way to get live Air Traffic Control and fly with other online pilots.</p></div>
<p></p>
<?php MainController::Run('FirstSteps', 'widget'); ?>
<!-- <?php MainController::Run('News', 'ShowNewsFront', 1); ?> -->
<?php } ?>
<br>
<P STYLE="font-size: 12pt; color:#000"> <strong>Elite Flights in Progress </strong></p>
	<center><table border = "0" width="103%" class="acarsmap">
<thead>
	<tr bgcolor=#012C5D style="color:#fff;">
		<td style="padding:5px;"><b>Pilot</b></td>
		<td><b>Flight Number</b></td>
		<td><b>Aircraft</b></td>
		<td><b>Departure</b></td>
		<td><b>Arrival</b></td>
		<td><b>Altitude</b></td>
		<td><b>Speed</b></td>
		<td><b>Distance/Time Remain</b></td>
	</tr>
</thead>
<tbody id="pilotlist"></tbody>
</table></center>
<div id="white_main">
<?php 
/**
 * These are some options for the ACARS map, you can change here
 * 
 * By default, the zoom level and center are ignored, and the map 
 * will try to fit the all the flights in. If you want to manually set
 * the zoom level and center, set "autozoom" to false.
 * 
 * You can use these MapTypeId's:
 * http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeId
 * 
 * Change the "TERRAIN" to the "Constant" listed there - they are case-sensitive
 * 
 * Also, how to style the acars pilot list table. You can use these style selectors:
 * 
 * table.acarsmap { }
 * table.acarsmap thead { }
 * table.acarsmap tbody { }
 * table.acarsmap tbody tr.even { }
 * table.acarsmap tbody tr.odd { } 
 */
?>
<script type="text/javascript">
<?php 
/* These are the settings for the Google map. You can see the
	Google API reference if you want to add more options.
	
	There's two options I've added:
	
	autozoom: This will automatically center in on/zoom 
	  so all your current flights are visible. If false,
	  then the zoom and center you specify will be used instead
	  
	refreshTime: Time, in seconds * 1000 to refresh the map.
	  The default is 10000 (10 seconds)
*/
?>
var myStyle = [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#193341"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#2c5a71"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#29768a"},{"lightness":-37}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#406d80"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#406d80"}]},{"elementType":"labels.text.stroke","stylers":[{"visibility":"on"},{"color":"#3e606f"},{"weight":2},{"gamma":0.84}]},{"elementType":"labels.text.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"administrative","elementType":"geometry","stylers":[{"weight":0.6},{"color":"#1a3541"}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#2c5a71"}]}]
var acars_map_defaults = {
	autozoom: false,
	styles: myStyle,
	zoom: 4,
    center: new google.maps.LatLng("<?php echo Config::Get('MAP_CENTER_LAT'); ?>", "<?php echo Config::Get('MAP_CENTER_LNG'); ?>"),
    mapTypeId: google.maps.MapTypeId.TERRAIN,
    refreshTime: 10000
};
</script>
<div class="mapcenter" align="center">
	<div id="acarsmap" style="width:920px; height: <?php echo Config::Get('MAP_HEIGHT')?>"></div>
</div>
<?php
/* See below for details and columns you can use in this table */
?>
<script type="text/javascript" src="<?php echo fileurl('/lib/js/acarsmap.js');?>"></script>
<?php
/* This is the template which is used in the table above, for each row. 
	Be careful modifying it. You can simply add/remove columns, combine 
	columns too. Keep each "section" (<%=...%>) intact
	
	Variables you can use (what they are is pretty obvious)
	
	Variable:							Notes:
	<%=flight.pilotid%>
	<%=flight.firstname%>
	<%=flight.lastname%>
	<%=flight.pilotname%>				First and last combined
	<%=flight.flightnum%>
	<%=flight.depapt%>					Gives the airport name
	<%=flight.depicao%>
	<%=flight.arrapt%>					Gives the airport name
	<%=flight.arricao%>
	<%=flight.phasedetail%>
	<%=flight.heading%>
	<%=flight.alt%>
	<%=flight.gs%>
	<%=flight.disremaining%>
	<%=flight.timeremaning%>
	<%=flight.aircraft%>				Gives the registration
	<%=flight.aircraftname%>			Gives the full name
	<%=flight.client%>					FSACARS/Xacars/FSFK, etc
	<%=flight.trclass%>					"even" or "odd"
	
	You can also use logic in the templating, if you so choose:
	http://ejohn.org/blog/javascript-micro-templating/
*/
?>
<script type="text/html" id="acars_map_row">
<tr class="<%=flight.trclass%>">
<td><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotname%> - <%=flight.pilotid%></a></td>
<td><%=flight.flightnum%></td>
<td><%=flight.aircraftname%></td>
<td><%=flight.depicao%></td>
<td><%=flight.arricao%></td>
<td><%=flight.alt%></td>
<td><%=flight.gs%></td>
<td><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%></td>
</tr>
</script>

<?php
/*	This is the template for the little map bubble which pops up when you click on a flight
	Same principle as above, keep the <%=...%> tags intact. The same variables are available
	to use here as are available above.
*/
?>
<script type="text/html" id="acars_map_bubble">
<span style="font-size: 10px; text-align:left; width: 100%" align="left">
<a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotname%> - <%=flight.pilotid%></a><br />
<strong>Flight <%=flight.flightnum%></strong> (<%=flight.depicao%> to <%=flight.arricao%>)<br />
<strong>Status: </strong><%=flight.phasedetail%><br />
<strong>Dist/Time Remain: </strong><%=flight.distremaining%> <?php echo Config::Get('UNITS');?> / <%=flight.timeremaining%><br />
</span>
</script>

<?php
/*	This is a small template for information about a navpoint popup 
	
	Variables available:
	
	<%=nav.title%>
	<%=nav.name%>
	<%=nav.freq%>
	<%=nav.lat%>
	<%=nav.lng%>
	<%=nav.type%>	2=NDB 3=VOR 4=DME 5=FIX 6=TRACK
 */
?>
<script type="text/html" id="navpoint_bubble">
<span style="font-size: 10px; text-align:left; width: 100%" align="left">
<strong>Name: </strong><%=nav.title%> (<%=nav.name%>)<br />
<strong>Type: </strong>
<?php	/* Show the type of point */ ?>
<% if(nav.type == 2) { %> NDB <% } %>
<% if(nav.type == 3) { %> VOR <% } %>
<% if(nav.type == 4) { %> DME <% } %>
<% if(nav.type == 5) { %> FIX <% } %>
<% if(nav.type == 6) { %> TRACK <% } %>
<br />
<?php	/* Only show frequency if it's not a 0*/ ?>
<% if(nav.freq != 0) { %>
<strong>Frequency: </strong><%=nav.freq%>
<% } %>
</span>
</script>
</div>

<!--Start Table-->
<?php
$count = 10;
$pireps = PIREPData::getRecentReportsByCount($count);
?>
<br>
<P STYLE="font-size: 12pt; color:#000"> <strong> Our Last Ten Flights </strong></p>
<table width="103%" border="0" bordercolor="#FFFFFF">
         <tr align="left" valign="center" bgcolor="#012C5D">
           <td style="padding:5px;"><strong><font color="#FFFFFF">  Pilot</font></strong></td>
		   <td><strong><font color="#FFFFFF">Flight #</font></strong></td>
           <td><strong><font color="#FFFFFF">Aircraft</font></strong></td>
           <td><strong><font color="#FFFFFF">Departure</font></strong></td>
           <td><strong><font color="#FFFFFF">Arrival</font></strong></td>
           <td><strong><font color="#FFFFFF">Duration</font></strong></td>
          </tr>
            </thead>
           
        <tbody>
   
<?php
if(count($pireps) > 0)
{
  foreach ($pireps as $pirep)
  {
        $pilotinfo = PilotData::getPilotData($pirep->pilotid);
        $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
        echo "<tr>";
        echo "<td align=left> $pilotinfo->firstname $pilotinfo->lastname - ETX$pilotinfo->pilotid </td>";
        echo "<td align=left> $pirep->code $pirep->flightnum </td>";
        echo "<td align=left> $pirep->aircraft </td>";
        echo "<td align=left> $pirep->depicao </td>";
        echo "<td align=left> $pirep->arricao </td>";
        echo "<td align=left> $pirep->flighttime </td>";
        echo "</tr>";
  }
}
else
{
        echo "<tr><td>There are no recent flights!</td></tr>";
}
?>
</table>
</td></td>
    </tr>
  </tbody>
</table>
<P STYLE="font-size: 12pt; color:#000"> <strong>Aircraft currently in Maintenance</strong></p>
Aircraft that are currently in maintenance are disabled until the maintenance check is completed!
<br /><br />
<?php if(!$maintenance)
{
echo "Currently there are no aircraft undergoing maintenance!";
}
else {
?>
<table border="0" width="103%" bordercolor="#FFFFFF">
<tr align="left" valign="center" bgcolor="#012C5D">
	<th style="padding:5px;"><strong><font color="#FFFFFF">Aircraft</font></strong></th>
	<th><strong><font color="#FFFFFF">Checktype</font></strong></th>
	<th><strong><font color="#FFFFFF">Condition</font></strong></th>
	<th><strong><font color="#FFFFFF">Finish Date</font></strong></th>
</tr>
<?php foreach($maintenance as $maint)
{
?>
<tr>
<td><?php echo $maint->name; ?> (<?php echo $maint->registration; ?>)</td>
<td><?php echo $maint->checktype; ?></td>
<td><?php echo $maint->totalstate; ?>%</td>
<td><?php echo gmdate('d. m. Y - H:i', strtotime($maint->finishdate)); ?></td>
</tr>
<?php } ?>
</table>	
<?php } ?>

 

Quote

What are the last three or so items you changed on the site? If it worked before, chances are it is caused by something you recently did.

That is really the clincher as the webhost moved to a new server and transferred the files and we have been playing whack a mole every since. This is the last issue and I suspect it a a file or table that got corrupted along the way. The problem is I cannot find an instance where a call to a table causes problems in other portions of the site. I have emptied the ACARS tables and run all of the Maintenance tools. 

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...