Web based family history software

Question ID Numbering

  • omnior
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 10 months ago #1 by omnior
ID Numbering was created by omnior
This is maybe more of a general question about the numbering System in PGV/webtrees. Today I remarked, that my gedcom has for Persons 1-digit, 2-digit, 3-digit and 4-digit entries. Years ago in the beginning I started with I0001 and so on, but now there are IDs named Ix and I000x and so on. Did this chane due to database definitions?
With the prefix you can tell the database to use which letter, but apparently the length of an ID is not really fixed. Maybe it is not important at all, maybe because it is an alphanumeric index field, but I prefer to get rid of it. Did anybody already have to do with this problem and solved it? How can I avoid that problem in the future. I don't know why, but new entries now always fill up non existing numbers (below I1000) and therefore create possible false ID's.

Wer etwas will sucht Wege,
wer etwas nicht will sucht Gründe...

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
13 years 10 months ago #2 by ToyGuy
Replied by ToyGuy on topic Re: ID Numbering
The system is not numbering with 'false' ID's, but rather it will fill in vacancies if the NEXT-ID is reset to a low number. There is nothing wrong with these ID numbers, but they will be out of sequence numerically from your previously created INDI-ID's.

If, for whatever reason you believe you need to have a 'fixed-length' INDI-ID number, then export your GEDCOM and use a GREP function on the 0 INDI ID line and repad the numbers. I've never understood why someone would want to do this, but I do host a GEDCOM for a cousin who did use a Ixxxxx system. Mine is I1 through I77000 and F1 through F27000, etc.
-Stephen

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

  • omnior
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 10 months ago #3 by omnior
Replied by omnior on topic Re: ID Numbering
Maybe I was not clear enough. The problem I see is that I have a numbers like I0001 and I1. Are you sure this will not lead to problems? I found out that when I tried to use Nigels renumbering spreadsheat I ran into problems, because numerically they are identical.
Then I realized that I already have problems in my database, because there seem to be some restraints with these "false identical" numbers.
Try it in the demo database. There is the same behaviour. Delete an entry and create a new one. A new entry will have the ID I1 (although I001 still exists, this is probably because once in PGV this was the basic structure).
Now you can't delete neither the new created ID nor the old ID. You always create an error like this:

ERROR 8: Undefined variable: xref
0 Error occurred on line 313 of file functions_edit.php in function delete_gedrec
1 called from line 2569 of file functions_edit.php in function delete_person
2 called from line 1909 of file edit_interface.php

Notice: Undefined variable: xref in /home/httpd/vhosts/webtrees.net/httpdocs/webtrees_demo/includes/functions/functions_edit.php on line 313

Wer etwas will sucht Wege,
wer etwas nicht will sucht Gründe...

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
13 years 10 months ago #4 by ToyGuy
Replied by ToyGuy on topic Re: ID Numbering
What a mess. Yes, these are duplicate INDI id's as they are, in fact equivalent in the database.

You could use grep on all your Innnn and change them to another prefix, like i9nnnn, but then I don't know how many numbers you have in your gedcom. Then you'll have no duplicates as you will leave the small numbered versions alone.

Do you have the same issue with Fxxxxx ?

After that, I'd email the gedcom to me and let me renumber the entire database from I1 thru Ixxxx. You can advise whatever INDI you wish to be # I1. mailto:gedcom-at-myarnolds-dot-com

Stephen

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #5 by kiwi
Replied by kiwi on topic Re: ID Numbering
No, not a mess at all.

As first stated the ID field is alphanumeric, so I0001 is NOT the same as I1.

The reason for the error you saw on the DEMO system is much more basic than that - you forgot to "Accept Changes" after making them. The Admin user does not have "auto-accept changes" set to yes.

I just accepted your changes, and was then able to delete I1 without difficulty.

I have left your other test (I2) in place so you can try for yourself. Also try searching, you will see that the results are quite different if you search for I2 or I002.

I agree the numbering in your GEDCOM file "looks" odd, but I can assure you it makes absolutely no difference to webtrees (or PGV which has exactly the same behavior).

Please Log in or Create an account to join the conversation.

  • omnior
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 10 months ago #6 by omnior
Replied by omnior on topic Re: ID Numbering
Hi Nigel, the problem is, that I reproduce this error in my database as well. Yes, the record is marked for deletion, but even if I as admin accept the changes, I receive:

GEDCOM-Änderungen überprüfen
ERROR: Invalid gedcom record.Änderungen erfolgreich in die Datenbank übernommen
Es liegen derzeit keine Änderungen zur Überprüfung vor.
Fenster schließen

Sorry for the german, it says Yes the changes were accepted, but in the same time there is this error. And in fact, the ID is not deleted!

Wer etwas will sucht Wege,
wer etwas nicht will sucht Gründe...

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
13 years 10 months ago #7 by ToyGuy
Replied by ToyGuy on topic Re: ID Numbering
Nigel is probably correct on the alpha-numeric identification. If so, simply bundle up your gedcom, send it to me for renumbering and tell me which INDI you wish to be I1. I'll give it a try and return it to you for import and review.
stephen

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #8 by kiwi
Replied by kiwi on topic Re: ID Numbering
I believe that is a different issue, not in any way related to ID numbering. I can certainly delete either I2 or I002 on DEMO with no problem. As Stephen suggested, perhaps send one of us your GEDCOM file to look at test on our setups?

At what point in the delete process do you get the error?

However, you used my spreadsheet to merge, so that may be where the fault was created. I'm sure that the spreadsheet would not deal well with mixed numbering styles - I never considered that when I wrote it. I only use simple I1 to I999999 style. For the spreadsheet to work it MUST be able to do numeric calculations on the ID number after removing the "I". Perhaps you really do have two identical ID numbers (like two I001 records)?

Please Log in or Create an account to join the conversation.

  • omnior
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 10 months ago #9 by omnior
Replied by omnior on topic Re: ID Numbering
I just sent Stephen the gedcom.
Actually I am logged in as demo_admin on the webtrees.net/demo and see there are stilll the IDs I2 and I002. Both can't be deleted, they produce an error like stated.
What am I doing wrong?

Wer etwas will sucht Wege,
wer etwas nicht will sucht Gründe...

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #10 by kiwi
Replied by kiwi on topic Re: ID Numbering
Thats is interesting. Still not related to ID numbers though.

When I tested earlier I logged in with my Site Admin permissions. Now if I try as you did and log in as Demo Admin, I get the same error. But if I try to delete (say) I152, I get the same error, and there is no ID number conflict there.

I will look further, but it seems likely to be a problem with user permissions for that user. Presumably the same problem for your user on your own system.

Could you report it as a bug please, and assign it to me.

Please Log in or Create an account to join the conversation.

  • ToyGuy
  • Offline
  • Moderator
  • Moderator
  • Live like it's Christmas every day - Santa Stephen
More
13 years 10 months ago #11 by ToyGuy
Replied by ToyGuy on topic Re: ID Numbering
Robert's GED has been renumbered and cleaned of preceding "0" within the INDI ID number and returned to him by reply email. There were three internal tag numbering errors (ADDR line two with no tag, 3 OBJE with no 2, SOUR numbering error in REPO). His primary INDI was renumbered to I1. He may still have an issue with NOTE ID's as he has some with a two-character prefix "NI", although we have both S and SR tags in our SOUR information and it causes no issues with webtrees.
-Stephen

Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #12 by kiwi
Replied by kiwi on topic Re: ID Numbering
"NI" or "SR" will work, but webtrees will still see the "S" and "N" as the prefix. The second character will be part of the actual ID.

We identified the problem as relating to the auto-accept function though, not anything to do with the IDs. Greg has committed a fix to it.

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #13 by fisharebest
Replied by fisharebest on topic Re: ID Numbering
kiwi wrote:

"NI" or "SR" will work, but webtrees will still see the "S" and "N" as the prefix. The second character will be part of the actual ID.


I'm not sure what you mean by this. I don't think webtrees (or PGV) ever tries to split an XREF into a prefix and ID.

We combine them when generating IDs, but we don't split them anywhere.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
13 years 10 months ago #14 by kiwi
Replied by kiwi on topic Re: ID Numbering
You're right Greg, it doesn't mean much. I was just pointing out 'why' "SR" works OK despite the config setting saying the prefix should be "S".

This thread has become confused, because its original premise - that references like I1 and I001 in the same file were causing conflicts resulting in an error message - was incorrect. The error was in fact caused by the problem with the 'auto-accept' function (thanks for fixing that by the way).

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}