Question ID Numbering
- omnior
- Topic Author
- Offline
- New Member
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
- Live like it's Christmas every day - Santa Stephen
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
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
- Live like it's Christmas every day - Santa Stephen
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.
- kiwi
- Offline
- Platinum Member
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).
Nigel
www.our-families.info
Please Log in or Create an account to join the conversation.
- omnior
- Topic Author
- Offline
- New Member
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
- Live like it's Christmas every day - Santa Stephen
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.
- kiwi
- Offline
- Platinum Member
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)?
Nigel
www.our-families.info
Please Log in or Create an account to join the conversation.
- omnior
- Topic Author
- Offline
- New Member
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.
- kiwi
- Offline
- Platinum Member
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.
Nigel
www.our-families.info
Please Log in or Create an account to join the conversation.
- ToyGuy
- Offline
- Moderator
- Live like it's Christmas every day - Santa Stephen
-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.
- kiwi
- Offline
- Platinum Member
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.
Nigel
www.our-families.info
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
"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.
- kiwi
- Offline
- Platinum Member
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).
Nigel
www.our-families.info
Please Log in or Create an account to join the conversation.