Jump to content

Duplicate flights


PlumbBum

Recommended Posts

  • Administrators

Are the flights in the database multiple times when this happens or just one row?

If they are only in the data table one time there must be something in the code that is loading the flights multiple times but I would think if that was the case it would display the same amount for each flight. If they are in the table multiple times I would look at timeout errors for ACARS users and/or the site. You can also empty the ACARS table from the admin panel and see if that helps. Have you enabled error logging to see if there is anything showing up there? How to get debug info -> http://forum.phpvms....ging-issues-r31

  • Like 1
Link to comment
Share on other sites

Hello simpilot, thank you for your reply!

This is the acars data table at the moment, in the phpMyAdmin:

0j186D8X9L.png

and this is the main website:

7K4G1i539V.png

I have tried clearing the ACARS table through the admin table, and the table empties, and when they all eventually load, the above happens.

I just turned on debug info and the logs weren't updated, bar the log.txt file, which is nothing to do with this error in particular. Any suggestions?

Thanks

PlumbBum

Link to comment
Share on other sites

Hello,

I know someone attempted to ask this question before on the forum, so I can see this issue has been going on for a little while. Honestly, I have no idea as to why it's happening. Best guess is that this is a cache issue, but I am not too sure as to the technicalities. However, my solution to this would be to attempt replacing the individual flight rows that are being generated from the JS to straight up PHP as seen below:

https://github.com/m...bbc5440bccd5b61

The red signifies what needs to be removed, the green signifies what needs to be added. As Usual, BACKUP.

Kind Regards,

Ryan

  • Like 1
Link to comment
Share on other sites

Huh, interesting.

Couldn't happen to notice that the ones that are repeating are only virtual airlines without the Flight num ICAO "VIR" which may lead me to think that there's a little issue in the SQL somewhere. Try instead of the code I gave you on line 67 of the github thing, as seen here:

$flights = ACARSData::GetAllFlights();

Replace it with maybe the following

$flights = DB::get_results("SELECT * FROM `phpvms_acarsdata`");

Be sure to replace your DB prefix with that phpvms_

  • Like 1
Link to comment
Share on other sites

Is it placed on the index.php/acars extension or did you move it to another function to test. I tried visiting the site but it's displaying as the Live flight information page is not available. You need to put it back to where it was(The index function of the acars module) to have it work properly

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