invernyx / smartcars-3-phpvms5-api

The API responsible for connecting smartCARS to phpVMS 5
MIT License
7 stars 7 forks source link

[BUG] - Aircraft Type, Registration and ICAO are not shown on the live map #98

Closed PilotFlying99 closed 8 months ago

PilotFlying99 commented 1 year ago

Describe the bug

Good day,

since one of the recents updates oour live map does not show the aircraft registration and ICAO anymore. We did not make any code changes, just updated from API version 0.3.5 to version 0.3.7.

We followed the suggested changes from https://github.com/invernyx/smartcars-3-bugs/issues/184 to make it work in the past.

Suddenly, this stopped working. Any ideas why?

How do you reproduce this bug?

  1. Navigate to the livemap of phpVMS 5

Expected behavior

The aircraft type, registration and ICAO is not being exported to the hphVMS anymore.

Screenshots

error

Operating system

Windows 10 Pro 22H2

Community airline

LH Virtual Group

smartCARS Version

3.0.0

Plugins installed

Chat, Flight Center, Flight Tracking, Logbook, Map, SimBrief

Additional context

The aircraft type, registration and ICAO is not being exported to the hphVMS anymore.

GenericNerd commented 1 year ago

Transferred to the correct repository

ifly-leonard commented 1 year ago

I have a similar issue at one of my VAs too! When the pilot has MORE than 1 bid, SC3 fetches the aircraft information from the first bid, despite the flight in the first bid already being complete. I have temporarily curbed this by disabling pilots to have multiple bids, but that's not a permanent solution.

We're on API Version 0.3.7 (phpvms5)

image

EpicHax7 commented 1 year ago

yes having exactly the same issue as mentioned by @ifly-leonard can u guy look into this please thank you

GenericNerd commented 1 year ago

Hey all (@EpicHax7 @ifly-leonard @PilotFlying99). I've update the API on the development branch to 0.3.8 which has hopefully restored this. Let me know whether this resolves it for you!

PilotFlying99 commented 1 year ago

@GenericNerd Thank you very much! We moved a step ahead.

However, there is still one issue: the aircraft which is now shown, is the scheduled aircraft, not the actual chosen aircraft inside the smartCARS 3 client.

Bildschirmfoto 2023-10-06 um 21 49 57
PilotFlying99 commented 1 year ago

The issue also consists when viewing the PIREP via the admin panel. It shows the scheduled aircraft, not the actual chosen one via the smartCARS 3 client.

zPJnKlwD3rFodE30k-sTRe-jhuwhVQKJYA
PilotFlying99 commented 1 year ago

Update: I fixed the issue myself.

You need to change line 32 in /0.3.8/handlers/phpvms5/flights/update.php from:

'aircraft' => $flightDetails['aircraft'], to 'aircraft' => $_POST['aircraft'],

Additionally, you need to change line 61 in /0.3.8/handlers/phpvms5/flights/complete.php from:

'aircraft' => $route['aircraft'], to 'aircraft' => $_POST['aircraft'],

GenericNerd commented 1 year ago

I’ll reopen this issue as there is a documented fix that I’ll implement in this version

GenericNerd commented 9 months ago

Can you all try the 0.3.9 branch and let me know if that solution works for you?

GenericNerd commented 8 months ago

This issue is now stale. If this is still happening, please open up a new issue and refer to this issue.