BiologicalRecordsCentre / UKBMS-online

Issue tracking for UKBMS online recording site
2 stars 0 forks source link

Timed Count page not working #254

Closed IanMiddlebrook closed 2 years ago

IanMiddlebrook commented 2 years ago

Hi @Gary-van-Breda @DavidRoy

There seems to be a fundamental problem with the Time Counts data entry page.

From the page 'My Timed Counts', if you click on a date to set up a new count, it takes you through to the data entry page, but the Date field is blank 'dd/mm/yyyy', as is the Year field (even though the date is in the URL).

If you complete the Date field, and the other fields, draw your flight area and then click Next, you end up on the same page with an error message - the Date field has reverted to blank and the Year field has not automatically completed - so it's not possible to progress.

https://ukbms.org/input-timed-counts?date=31/07/2021

image

Thanks, Ian

Gary-van-Breda commented 2 years ago

Towards the end of last year, the way date and time fields were dealt was changed, moving away from jQuery over to HTML5. The associated code changes were a bit over-zealous, and removed the automatic filling in of the year field from the date on this form. I have re-instated this functionality. @IanMiddlebrook : I have deployed this to Test for you to check. Once you are happy with it, I'll push it to Live.

IanMiddlebrook commented 2 years ago

Hi @Gary-van-Breda I've had a go with this on the test version. The year/date issue is now sorted and it's possible to get through tp the next page. I tried to enter a count, but noticed that there didn't seem to be any sort of taxa check/list in the species field - it's more like a free text box. So when I finished and tried to save the record, I got this:

An internal error has occurred: there has been a mismatch between the validation applied in the browser and that applied by the warehouse. Please contact the site administrator, and provide them with the following diagnostic information. Array ( [occurrence:taxa_taxon_list_id] => The taxon must be specified. ) Array ( [auth_token] => a512a9bd70c90e45fcc391ccd20e93f205c113d3 [nonce] => 37356058867c823d6903149987d79050fd4a1a1a [page] => occurrences [read_nonce] => 6670b8204f04d4c2d652b3b87617d6b530ba50c7 [read_auth_token] => 2a386254c293dfef924f9e1f24bbc3c5fd07ab2e [website_id] => 27 [sample:id] => 16979994 [sample:survey_id] => 170 [sample:date] => 2021 [sample:entered_sref] => SY656778 [sample:entered_sref_system] => OSGB [sample:geom] => POLYGON((-276812.12692906 6550625.925268,-276597.14778704 6550759.6900675,-276668.80750105 6550893.454867,-276902.89590014 6550759.6900675,-276812.12692906 6550625.925268)) [occurrence:record_status] => C [C1:sample:id] => 16979995 [C1:sample:sample_method_id] => 3331 [C1:sample:date] => 10/07/2021 [C1:smpAttr:287] => 12:00 [C1:smpAttr:288] => 12:20 [C1:smpAttr:286] => 100 [C1:smpAttr:289] => 2437 [C1:smpAttr:291] => 2462 [C1:smpAttr:290] => 2455 [taxonLookupControl] => [O1:1:--ttlid--:--occid--:3:--valid--] => 5 [C1:smpAttr:363] => [C2:sample:sample_method_id] => 3331 [C2:sample:date] => )

Gary-van-Breda commented 2 years ago

OK - again more changes associated with the change in the way the date fields are processed, but this time on the 2nd page. This led to a Javascript error which meant the autocompletes on the species fields were not initialised.

@IanMiddlebrook : I have deployed this to Test for you to check.

IanMiddlebrook commented 2 years ago

Thanks @Gary-van-Breda That's seems to have worked. The only remaining issue I now see with the Timed Counts is when you review an existing count, the map on the data entry page is still zoomed right out, so you can't really see where the mapped polygon is. Would it be possible to have a sensible zoom level for an existing count?

Thanks, Ian

Gary-van-Breda commented 2 years ago

@IanMiddlebrook : I've deployed a fix to Test for the initial zoom issue. If you'd like to have a final check, then I'll push to Live.

IanMiddlebrook commented 2 years ago

Thanks @Gary-van-Breda Yes, all looks good now.

Gary-van-Breda commented 2 years ago

Now pushed to Live. Changes confirmed as deployed. Closing