magicbug / Cloudlog

Web based amateur radio logging application built using PHP & MySQL supports general station logging tasks from HF to Microwave with supporting applications to support CAT control.
http://www.cloudlog.co.uk
MIT License
460 stars 190 forks source link

Message: Undefined array key "qso_date" #3036

Closed PartTimeLegend closed 5 months ago

PartTimeLegend commented 7 months ago

Describe the bug When importing my ADIF log file via the web interface I get this error.

A PHP Error was encountered
Severity: Warning

Message: Undefined array key "qso_date"

Filename: models/Logbook_model.php

Line Number: 3192

A PHP Error was encountered
Severity: Warning

Message: Undefined array key "qso_date"

Filename: models/Logbook_model.php

Line Number: 3203

A PHP Error was encountered
Severity: Warning

Message: Undefined array key "qso_date"

Filename: models/Logbook_model.php

Line Number: 3192

A PHP Error was encountered
Severity: Warning

Message: Undefined array key "qso_date"

Filename: models/Logbook_model.php

Line Number: 3203

A PHP Error was encountered
Severity: Warning

Message: Undefined array key "qso_date"

Filename: models/Logbook_model.php

Line Number: 3192

A PHP Error was encountered
Severity: Warning

Message: Undefined array key "qso_date"

Filename: models/Logbook_model.php

Line Number: 3203

To Reproduce Steps to reproduce the behaviour:

  1. Go to index.php/adif and select to import log file (attached). Don't select any of the checkboxes on the screen.
  2. Click on Upload.
  3. Scroll up to the top of the screen where you will see the above errors.
  4. See error

Expected behaviour Not throw exceptions.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

Additional context Webserver

m7fgz.381236.20240328131509.adi.txt

magicbug commented 7 months ago

I'm a bit short of time to find the perminant fix as its CQ WPX Contest coming up this weekend but it looks like its todo with the following QSOS

Error QSO: IZ5WSR QSO_Date is Missing?

Error QSO: PD2GCM QSO_Date is Missing?

Error QSO: UX0FY QSO_Date is Missing?

I've had a quick glance and the qso_date is present so will need to dig into this a bit more after the weekend to see what the problem actually is.

magicbug commented 7 months ago

I believe the issue for each of these QSOS is the qsl_via field in each record seem to be incorrect but might be wrong

magicbug commented 7 months ago

I can confirm the issue is with the qsl_via tags for those 3 QSOs the output from QRZ Logbook is incorrect saying the strings are longer than they are and thus giving malformed ADIF records it looks like QRZ Logbook isn't handling unicode properly.

See below for the ADIF with the offending issues removed.

fixed_adif.txt

I'll add some code into Cloudlog to hopefully catch this