1

Topic: annoying error adding records

since updating to 6.25 we have found an extremely strange inconsistent behaviour after adding records

In the example below the records were added to Recorder via a record card "Enter Species for a place" - when the records were checked in the main panel there were several duplicates (this should be impossible using a record card because you can't select the same species twice). First time this happened my colleague deleted one of the duplicates, which resulted in an error message gist being "Record does not exist" followed by BOTH occurrences disappearing (together with other unrelated occurrences).
Second time I checked, to find both occurrences have the same unique identifier (see attached image) - the last time this happened I found taxon occurrences with two determinations of which BOTH were set as preferred (which was easy to rectify) as you can see in the image, there is only one determination in this case.

Since starting this e-mail we've got another doubling by using the "add" button on the main window.

On creating a report there are no duplications, so it only appears to affect the main window, but in a list of 81 species entered via the Record Card, there were only 5 doubling ups! with no obvious pattern!

Post's attachments

error1.jpg 243.79 kb, 5 downloads since 2016-08-10 

You don't have the permssions to download the attachments of this post.
Craig Slawson
Staffordshire Ecological Record

2

Re: annoying error adding records

I am trying to duplicate this, so far without any success so far.   Please could you revert back to the original icon, just in case this is a display problem. Tools/Options/Appearance and tick use original icons.

If you can spot anything which makes the duplicating records different  from those not duplicatiing please let me know.

Can you please confirm that you rebuilt the dictionary index tables after the upgrade.

Mike Weideli

3

Re: annoying error adding records

It might be related to the species, because it has occurred sever time with Taraxacum officinale agg. off the preferred list (Dict 0000003B)

Also Deschampsia cespitosa, Rosa canina appear to be affected

Craig

Craig Slawson
Staffordshire Ecological Record

4

Re: annoying error adding records

We didn't rebuild the dictionaries after the upgrade because they weren't changed, but I will do now

Craig

Craig Slawson
Staffordshire Ecological Record

5

Re: annoying error adding records

Hi Craig

There were some substantial changes to the structure of Index Taxon Name, so not rebuilding the indexes may have caused the problem.  If  not then we need  try  some queries on the actual database to see what is actually being saved. The same Taxon Occurrence key can't be saved twice, and there were no changes to the input forms in 6.25, which makes me suspect that it is a display problem, rather than a problem with what is being saved, but we would need to check this.

Mike Weideli

6

Re: annoying error adding records

We have now rebuild the indexes and the error is still there and at least with the species list above

Craig

Craig Slawson
Staffordshire Ecological Record

7

Re: annoying error adding records

Hi

I think I know what is causing this. I think they may be taxa where you have added perhaps an additional common name or scientific name.  Do you think this is the case ? If so then I can provide a fix.

Otherrwise  can  you run the following queries in Management STudio.. I can put them  in xml report if this is easier.


Replace LC00000100000005 with  the sample key for one of  problem samples. 

Select S.Sample_Key,TOCC.Taxon_Occurrence_Key,TDET.Taxon_Determination_Key,TDET.Taxon_List_Item_Key, TDET.Preferred, ITN.Actual_Name  From Sample S
INNER JOIN Taxon_Occurrence TOCC ON TOCC.SAMPLE_KEY = S.SAMPLE_KEY INNER JOIN TAXON_DETERMINATION TDET
ON TDET.Taxon_Occurrence_Key = TOCC.TAXON_OCCURRENCE_KEY
INNER JOIN INDEX_TAXON_NAME ITN ON ITN.TAXON_LIST_ITEM_KEY = TDET.TAXON_LIST_ITEM_KEY
WHERE S.SAMPLE_KEY = 'LC00000100000005'


ALSO

SELECT DISTINCT TXO.Sample_Key, TXO.Taxon_Occurrence_Key,
       ITN.Taxon_List_Item_Key,
       ITN.Actual_Name,
       ITN.Actual_Name_Italic,
       ITN.Actual_Name_Attribute,
       ITN.Authority,
       ITN.Preferred_Name,
       ITN.Preferred_Name_Italic,
       ITN.Preferred_Name_Attribute,
       ITN.Preferred_Name_Authority,
       ITN.Common_Name,
       ITN.Common_Name_Italic,
       ITN.Common_Name_Attribute,
       TXO.Checked,
       TXO.Confidential, TXO.Zero_Abundance,TXO.Verified
FROM Taxon_Occurrence TXO
INNER JOIN Taxon_Determination TD ON TD.Taxon_Occurrence_Key = TXO.Taxon_Occurrence_Key
INNER JOIN Index_Taxon_Name ITN ON ITN.Taxon_List_Item_Key = TD.Taxon_List_Item_Key
WHERE TXO.Sample_Key = 'LC00000100000005'
AND
TD.Preferred = 1

ORDER BY ITN.Preferred_Name

Mike Weideli

8

Re: annoying error adding records

We've just noticed a similar problem after upgrading to Recorder 6.25.  We haven't entered any records using the recording cards, but we have just noticed that existing taxon occurrences of Pyronia tithonus (gatekeeper) and Melanargia galathea
(marbled white) appear to be duplicated.  When we tried to delete one record, they were both deleted, and editing one changed both of them.  Bizarrely, records of Pyronia tithonus (hedge brown) weren't affected.

I did rebuild the indexes after the upgrade, and we haven't added any new common names.  However, I have a SQL report that I use to export records that were entered after a specified date has always duplicated records of Pyronia tithonus and Melanargia galathea.  The report returns the common name, the actual name and the preferred name - when the records are duplicated one record has the actual name as gatekeeper (or marbled white) and the other has it as Pyronia tithonus (or Melanargia galathea).

Is there anything that we can do to fix it - bearing in mind that we aren't techie people!

Cheers
Ellie

Eleanor Knott
Devon Biodiversity Records Centre

9

Re: annoying error adding records

I think the records are only there once, but being shown twice. The fact that an SQL report is also showing these records twice, suggests that these species have at some time in the past been given additional  names - either common or scientific.

I am reluctant to provide a fix without confirmation from someone  with the problem about the cause, because if I am wrong it may do more harm than good.

If you look in Dictionaries/ Edit Taxon Details at these species do they show any entry under Taxon Name  ?

It is Ok to have a additional names here, but v6.25 and by the looks of it your report are failing to cope with these correctly.

Mike Weideli

10

Re: annoying error adding records

It's only a hunch but may it be related to this problem?: http://forums.nbn.org.uk/viewtopic.php?pid=23740#p23740

Keith

11

Re: annoying error adding records

There is an error in the code which isn't properly dealing with situations where a Taxon_List_Item_Key occurs more than once in table Index_Taxon_name. This is a valid situation where extra names (eg. additional common names) have been added, but could be a dictionary problem.

The effect on the Observation hierarchy is to show a record multiple times. However, they only exist once in the database, so the problem, although annoying doesn't indicate any corruption. It will be fixed in  upgrade   6.26, but can be fixed immediately by replacing RecorderApp.exe with the file at www.Recorder6.info/RecorderApp625a.zip.

Please rename the existing RecorderApp.exe which is in the R6 install folder and then copy in the unzipped RecorderApp.exe in the downloaded file. In case of a problem the original file can then be restored.

Mike Weideli