Jump to content
TNG Community
Hanne

*Solved* tng_eventtypes

Recommended Posts

Hanne

Hello (again) ūüėé

I have spent the whole day and half the night trying to tidy up and translate tng_eventtypes. I'm happy I have a test-tng site ūüėÖ. I hope I can explain relatively clear what the problem(s) is(are). I'll do my best and excuse that this is a long explanation:

I have translated all the eventtypes, so that the sql-database looks i.e. like this:

Quote

(1, 'ADOP', 'Adopteret', 'Danish-UTF8|Adopteret|English-UTF8|Adopted|German-UTF8|Angenommen', 1, 0, 0, 0, 'I'),
(2, 'CONF', 'Konfirmation', 'Danish-UTF8|Konfirmation|English-UTF8|Confirmation|German-UTF8|Bestätigung', 1, 0, 0, 0, 'I'),
(4, 'OCCU', 'Beskæftigelse', 'Danish-UTF8|Beskæftigelse|English-UTF8|Occupation|German-UTF8|Beschäftigung', 1, 1, 0, 0, 'I'),
(7, 'CENS', 'Folketælling', 'Danish-UTF8|Folketælling|English-UTF8|Census|German-UTF8|Volkszählung', 1, 1, 0, 0, 'I'),

At the moment I have 109 different eventtypes in TNG. (After I gave up cleaning and imported the backup).

I tidied up the eventtypes in Legacy, so that there are only 71 eventtypes left in that program. I have synchronized the eventtypes between the two programs meaning I deleted the redundant ones in TNG. I made an export from the database and deleted the lines/eventtypes I do not need any more. After cleaning up I performed this SQL statement:

"INSERT INTO `tng_eventtypes` (`eventtypeID`, `tag`, `description`, `display`, `keep`, `collapse`, `ordernum`, `ldsevent`, `type`) VALUES......" (and here comes the values line after line). 

The import was successful. I have 66 lines/values in this file.

Then time had come to look at data from a fresh GEDCOM file. I looked at data for myself.

1) I.e. I am adopted, but it was not displayed in English and German in TNG, only in Danish, though the database has the value in all 3 languages. There are several examples, but I guess one is enough.

2) I tried to delete the whole table, create it again and insert the eventtypes again. It did not help.

3) When I open the "Custom Event Types" in TNG it is like there is no connection between the tng_eventtypes table and what I see in TNG. How can this happen? TNG must have it's data from tng_eventtypes?

4) Look at the images I have inserted below. You'll see that "CENS" has ID 101. But in the database it has at first eventtypeID "7" and then there comes another eventtypeID "101". Every genealogist learns about censuses as one of the first sources, so the correct ID is definitely not 101. The images show that the ID used is the one with number "101".

5) Several eventtypes exist more than once. It is always the latest one that is being used.

6) Several eventtypes is missing a Type/description, but when I import/insert the values there are of course no empty fields.

7) The last image shows tags, where the description and the display field contains "?". The "?" represents Danish special characters (typically "√ł" but could¬† also be "√•" or "√¶"). The events in Legacy and in the file I import has the correct characters and look i.e. like this:

Quote

(95, 'EVEN', 'D√łds√•rsag', 'Danish-UTF8|D√łds√•rsag|English-UTF8|Cause of death|German-UTF8|Todesursache', 1, 0, 0, 0, 'I'),

Is there something I have completely misunderstood about the table tng_eventtypes? I have tried to search this FAQ but have not been able to find any answers. Any clue to a solution will make me very glad.

Thank you in advance.

Screenshot_1.jpg

Screenshot_2.jpg

Screenshot_3.jpg

Edited by Hanne
Marked solved

Share this post


Link to post
Share on other sites
Rob Severijns

Hanne,

Not sure why you did it the way you did but have you tried importing only the Event Types from within the import module in TNG.

See screenshot.

image.png

So basicly you make a Gedcom in Legacy and that Gedcom is used to only import the existing Event Types.

Rob

Share this post


Link to post
Share on other sites
Hanne

Hi Rob

Thanks a lot for your reply!

Since I wrote the post, and before I saw you reply, I've had a partial solution form Darrin. I paste it in, so maybe others can use it. Darrin writes:

Quote

Hi Hanne, The problem is that you entered both a default "display" value and a list of other-language values for each custom event type. When both exist, TNG always uses the default, and when you enter values for other languages in the Admin interface, TNG automatically destroys that default. When you entered those values directly into the database, you bypassed that. So instead of importing a record like this:

(1, 'ADOP', 'Adopteret', 'Danish-UTF8|Adopteret|English-UTF8|Adopted|German-UTF8|Angenommen', 1, 0, 0, 0, 'I')

You should blank out the default display field, like this:

(1, 'ADOP', '', 'Danish-UTF8|Adopteret|English-UTF8|Adopted|German-UTF8|Angenommen', 1, 0, 0, 0, 'I')

Darrin

I answered this:

Quote

Now I have deleted all the display values in my short file with the 66 rows/eventtypes and want to import it again on the test database. phpMyAdmin does not like that. It stops at ID 12 saying "#1062 - Ens værdier 'I-EVEN-' for indeks 'typetagdesc'". That means something like: "#1062 - equal values 'I-EVEN-' for indeks 'typetagdesc'". It is logical, that a value can only be there once, but phpMyAdmin has already imported both ID 10 and 11 where the tag is also "EVEN", and there are many "EVEN" that have to be imported. Why does it stop at ID 12? (I attach the file, so you can see what is going on.)

I started using the database, because TNG broke down every time I tried to add another translation in the TNG back end. I have not tried to import only the custom eventtypes. I do not understand how else I could add new types from Legacy.

I also asked him:

Quote

 

1. Why does similar types arise? Do I make a mistake during import accepting new eventtypes? But they are not new...

2. How do I handle the problem, that the late eventtype is being used (I.e. "CENS" has  both ID 7 and 101, (before cleaning up), and it is ID 101 that is being used in TNG?)

3. How do I handle that the Danish characters are misunderstood?

 

I really don't like to send emails to Darrin because I'm sure he gets so many emails. But I did this time anyway.

I try to work with logical thinking, but this time that is not enough.

Share this post


Link to post
Share on other sites
Rob Severijns

Hi Hanne,

Thank you for your response and explanation.

Unfortunately I'm not able to be of help any further.

Hope you figure it out soon.

Rob

Share this post


Link to post
Share on other sites
Hanne

Hi Rob,

Thanks for your reply!

When I get a new answer/a solution from Darrin I'll paste it in here, as it might be useful for others.

Kind regards,
Hanne

Share this post


Link to post
Share on other sites
bhemph

Hanne,
     The EVEN tags do need to have the description column based on looking at my event table.  Otherwise when TNG reads the GEDCOM, it does not know which EVEN tag matches since it uses the description column to tell them apart.

Brent

Share this post


Link to post
Share on other sites
Hanne

Hi Brent,

Thanks for your reply, which is also logic, I have been thinking about the same, but:

1) Why could both ID 10 and 11 be accepted - when they are both EVEN and look like this:

(10, 'EVEN', '', 'Danish-UTF8|Vaccineret|English-UTF8|Vaccinated|German-UTF8|Geimpft', 1, 0, 0, 0, 'I'),
(11, 'EVEN', '', 'Danish-UTF8|Kundgjort|English-UTF8|Announced|German-UTF8|Angek√ľndigt', 1, 0, 0, 0, 'I'),


2) Why does it not "stop" till ID 12?

3) How does this fit with the answer from Darrin?

***

If it makes troubleshooting easier, I paste in the 66 rows below. Maybe I make another mistake? I can not code but I'm good at copy 'n paste...ūüėé

INSERT INTO `tng_eventtypes` (`eventtypeID`, `tag`, `description`, `display`, `keep`, `collapse`, `ordernum`, `ldsevent`, `type`) VALUES
(1, 'ADOP', '', 'Danish-UTF8|Adopteret|English-UTF8|Adopted|German-UTF8|Angenommen', 1, 0, 0, 0, 'I'),
(2, 'CONF', '', 'Danish-UTF8|Konfirmation|English-UTF8|Confirmation|German-UTF8|Bestätigung', 1, 0, 0, 0, 'I'),
(4, 'OCCU', '', 'Danish-UTF8|Beskæftigelse|English-UTF8|Occupation|German-UTF8|Beschäftigung', 1, 1, 0, 0, 'I'),
(7, 'CENS', '', 'Danish-UTF8|Folketælling|English-UTF8|Census|German-UTF8|Volkszählung', 1, 1, 0, 0, 'I'),
(8, 'EDUC', '', 'Danish-UTF8|Uddannelse|English-UTF8|Education|German-UTF8|Ausbildung', 1, 1, 0, 0, 'I'),
(9, 'DEAT', '', 'Danish-UTF8|D√łd|English-UTF8|Death|German-UTF8|Tod', 1, 0, 0, 0, 'I'),
(10, 'EVEN', '', 'Danish-UTF8|Vaccineret|English-UTF8|Vaccinated|German-UTF8|Geimpft', 1, 0, 0, 0, 'I'),
(11, 'EVEN', '', 'Danish-UTF8|Kundgjort|English-UTF8|Announced|German-UTF8|Angek√ľndigt', 1, 0, 0, 0, 'I'),
(12, 'EVEN', '', 'Danish-UTF8|Fremstillet|English-UTF8|Represented|German-UTF8|Kirchliche Vertretung', 1, 0, 0, 0, 'I'),
(13, 'ADDR', '', 'Danish-UTF8|Adresse|English-UTF8|Address|German-UTF8|Adresse', 1, 0, 0, 0, 'I'),
(14, 'EMAIL', '', 'Danish-UTF8|E-mail|English-UTF8|Email|German-UTF8|Email', 1, 0, 0, 0, 'I'),
(15, 'ALIA', '', 'Danish-UTF8|Også kendt som|English-UTF8|Also known as|German-UTF8|Auch bekannt als', 1, 0, 0, 0, 'I'),
(16, 'PROB', '', 'Danish-UTF8|Skifte|English-UTF8|Probate|German-UTF8|Schalter', 1, 0, 0, 0, 'I'),
(17, 'RESI', '', 'Danish-UTF8|Bopæl|English-UTF8|Domicile|German-UTF8|Wohnort', 1, 1, 0, 0, 'I'),
(18, 'EVEN', '', 'Danish-UTF8|Nationalitet|English-UTF8|Nationality|German-UTF8|Staatsangehörigkeit', 1, 0, 0, 0, 'I'),
(19, 'RELI', '', 'Danish-UTF8|Religion|English-UTF8|Religion|German-UTF8|Religion', 1, 0, 0, 0, 'I'),
(21, 'EVEN', '', 'Danish-UTF8|Udmærkelse|English-UTF8|Distinction|German-UTF8|Unterscheidung', 1, 0, 0, 0, 'I'),
(22, 'EVEN', '', 'Danish-UTF8|Bekræftet|English-UTF8|Confirmed|German-UTF8|Bestätigt', 1, 0, 0, 0, 'I'),
(23, 'EVEN', '', 'Danish-UTF8|Publiceret|English-UTF8|Published|German-UTF8|Veröffentlicht', 1, 0, 0, 0, 'I'),
(24, 'EVEN', '', 'Danish-UTF8|Grad|English-UTF8|Degree|German-UTF8|Grad', 1, 0, 0, 0, 'I'),
(25, 'EVEN', '', 'Danish-UTF8|Værnepligt|English-UTF8|Enlistment|German-UTF8|Einberufung', 1, 0, 0, 0, 'I'),
(26, 'EVEN', '', 'Danish-UTF8|Pension|English-UTF8|Pension|German-UTF8|die Pension', 1, 0, 0, 0, 'I'),
(27, 'EMIG', '', 'Danish-UTF8|Udvandring|English-UTF8|Emigration\'|German-UTF8|Auswanderung', 1, 0, 0, 0, 'I'),
(28, 'EVEN', '', 'Danish-UTF8|Gårdnavn|German-UTF8|Hofname|English-UTF8|Farm name', 1, 0, 0, 0, 'I'),
(29, 'EVEN', '', 'Danish-UTF8|Alt. dåb|English-UTF8|Alt. christening', 1, 0, 0, 0, 'I'),
(30, 'EVEN', '', 'Danish-UTF8|Alt. vaccineret|English-UTF8|Alt. vaccinated', 1, 0, 0, 0, 'I'),
(31, 'BAPM', '', 'Danish-UTF8|Dåb|English-UTF8|Christening|German-UTF8|Taufe', 1, 0, 0, 0, 'I'),
(32, 'EVEN', '', 'Danish-UTF8|Kaldenavn|English-UTF8|Nickname|German-UTF8|Spitzname', 1, 0, 0, 0, 'I'),
(33, 'EVEN', '', 'Danish-UTF8|Navneændring|English-UTF8|Name change|German-UTF8|Namensänderung', 1, 0, 0, 0, 'I'),
(34, 'RETI', '', 'Danish-UTF8|Pensioneret|English-UTF8|Retired|German-UTF8|Im Ruhestand', 1, 0, 0, 0, 'I'),
(35, 'EVEN', '', 'Danish-UTF8|Kremering|English-UTF8|Cremation|German-UTF8|Einäscherung', 1, 0, 0, 0, 'I'),
(36, 'EVEN', '', 'Danish-UTF8|Bisat|English-UTF8|Funeral|German-UTF8|Beisetzung', 1, 0, 0, 0, 'I'),
(37, 'EVEN', '', 'Danish-UTF8|D√łdf√łdt|English-UTF8|Stillborn|German-UTF8|Tod geboren', 1, 0, 0, 0, 'I'),
(38, 'PHON', '', 'Danish-UTF8|Telefonnummer|English-UTF8|Phone number|German-UTF8|Telefonnummer', 1, 0, 0, 0, 'I'),
(39, 'IMMI', '', 'Danish-UTF8|Indvandring|English-UTF8|Immigration|German-UTF8|Einwanderung', 1, 0, 0, 0, 'I'),
(40, 'EVEN', '', 'Danish-UTF8|D√łmt|English-UTF8|Convicted|Gerrman-UTF8|Verurteilt', 1, 0, 0, 0, 'I'),
(41, 'EVEN', '', 'Danish-UTF8|Tilgang|English-UTF8|Influx|German-UTF8|Zugang', 1, 0, 0, 0, 'I'),
(42, 'EVEN', '', 'Danish-UTF8|Alt. f√łdsel|English-UTF8|Alt. birth|German-UTF8|Alt. Geburt', 1, 0, 0, 0, 'I'),
(43, 'EVEN', '', 'Danish-UTF8|Statsborgerskab|English-UTF8|Citizenship|German-UTF8|Staatsb√ľrgerschaft', 1, 0, 0, 0, 'I'),
(44, 'EVEN', '', 'Danish-UTF8|Alt. d√łd|English-UTF8|Alt. death|German-UTF8|Alt. Tod', 1, 0, 0, 0, 'I'),
(45, 'EVEN', '', 'Danish-UTF8|Stadfæstet|English-UTF8|Confirmed|German-UTF8|Bestätigt', 1, 0, 0, 0, 'I'),
(46, 'EVEN', '', 'Danish-UTF8|Kongebrev|English-UTF8|Special license|German-UTF8|Brief des Königs', 1, 0, 0, 0, 'I'),
(48, 'EVEN', '', 'Danish-UTF8|Jordpåkastelse|English-UTF8|To throw earth on|German-UTF8|Erdung', 1, 0, 0, 0, 'I'),
(49, 'EVEN', '', 'Danish-UTF8|Skilt|English-UTF8|Divorced|German-UTF8|Entscheidet', 1, 0, 0, 0, 'F'),
(50, 'ANUL', '', 'Danish-UTF8|Annullering|English-UTF8|Annulled|German-UTF8|Abgesagt', 1, 0, 0, 0, 'F'),
(51, 'EVEN', '', 'Danish-UTF8|Kærester|English-UTF8|Friends|German-UTF8|Freunde', 1, 0, 0, 0, 'F'),
(52, 'MARB', '', 'Danish-UTF8|Tillysning|English-UTF8|Publication of the banns|German-UTF8|Beleuchtung', 1, 0, 0, 0, 'F'),
(53, 'EVEN', '', 'Danish-UTF8|Trolovelse|English-UTF8|Engagement|German-UTF8|Verlobung', 1, 0, 0, 0, 'F'),
(54, 'EVEN', '', 'Danish-UTF8|Samlevere|English-UTF8|Cohabiters|German-UTF8|Mitlieferanten', 1, 0, 0, 0, 'F'),
(55, 'ENGA', '', 'Danish-UTF8|Forlovelse|English-UTF8|Engagement|German-UTF8|Verlobung', 1, 0, 0, 0, 'F'),
(56, 'MARL', '', 'Danish-UTF8|Ægteskabstilladelse|English-UTF8|Marriage license|German-UTF8|Heiratserlaubnis', 1, 0, 0, 0, 'F'),
(58, 'EVEN', '', 'Danish-UTF8|Alt. vielse|English-UTF8|Alt. marriage|German-UTF8|Alt. Hochzeit', 1, 0, 0, 0, 'F'),
(60, 'EVEN', '', 'Danish-UTF8|Lysning|English-UTF8|Publication of the banns|German-UTF8|Aufgebot', 1, 0, 0, 0, 'F'),
(61, 'DIV', '', 'Danish-UTF8|Skilt|English-UTF8|Divorced|German-UTF8|Entscheidet', 1, 0, 0, 0, 'F'),
(62, 'EVEN', '', 'Danish-UTF8|Separation|English-UTF8|Separation|German-UTF8|Trennung', 1, 0, 0, 0, 'F'),
(63, 'MEDI', '', 'Danish-UTF8|MEDIA|English-UTF8|MEDIA|German-UTF8|MEDIA', 1, 0, 0, 0, 'S'),
(64, 'DATE', '', 'Danish-UTF8|Dato|English-UTF8|Date|German-UTF8|Datum', 1, 0, 0, 0, 'S'),
(138, 'EVEN', '', 'Danish-UTF8|Sygdom|English-UTF8|Disease|German-UTF8|Krankheit', 1, 0, 0, 0, 'I'),
(92, 'NAME', '', 'Danish-UTF8|Navn|English-UTF8|Name|German-UTF8|Nahme', 1, 0, 0, 0, 'I'),
(93, 'EVEN', '', 'Danish-UTF8|(Stats-)borgerskab|German-UTF8|(Staats-)b√ľrgerschaft|English-UTF8|(State-)citizenship', 1, 0, 0, 0, 'I'),
(94, 'DESI', '', 'Danish-UTF8|Efterkommerinteresse|English-UTF8|Descendancy interest|German-UTF8|Nachkommensinteresse', 1, 0, 0, 0, 'I'),
(95, 'EVEN', '', 'Danish-UTF8|D√łds√•rsag|English-UTF8|Cause of death|German-UTF8|Todesursache', 1, 0, 0, 0, 'I'),
(98, 'GRAD', '', 'Danish-UTF8|Dimmission|English-UTF8|Graduation|German-UTF8|Abschluss', 1, 0, 0, 0, 'I'),
(110, 'FCOM', '', 'Danish-UTF8|F√łrste altergang|English-UTF8|First liturgy|German-UTF8|Erste Liturgie', 1, 0, 0, 0, 'I'),
(133, 'MARL', '', 'Danish-UTF8|Vielsesattest|English-UTF8|Marriage certificate|German-UTF8|Heiratsurkunde', 1, 0, 0, 0, 'F'),
(135, 'EVEN', '', 'Danish-UTF8|Bandlysning af ægteskab|English-UTF8|Prohibition of marriage|German-UTF8|Heiratsverbot', 1, 0, 0, 0, 'F');

Share this post


Link to post
Share on other sites
Ken Roy

Hanne,

Maybe you should delete that table and do like Rob suggested, Import only  Event types from your Legacy database and then only make changes using the TNG admin screens

 

Share this post


Link to post
Share on other sites
Hanne
22 minutes ago, Ken Roy said:

Hanne,

Maybe you should delete that table and do like Rob suggested, Import only  Event types from your Legacy database and then only make changes using the TNG admin screens

 

Hi Ken

Yeah that is a good idea! Maybe I understood the proposal from Rob. Language-problems are always presents as an issue.

But how do I get the translations then? It has taken my a long time translating the eventtypes to several languages.

Share this post


Link to post
Share on other sites
Ken Roy

You should then update the information using the TNG Admin > Custom Event Types.  Note that not all imported events should be marked as Accept.  For example _UID  should probably left as Ignore.

Add your translations using the Other Languages section of the Admin > Custom Event Types

 

 

Share this post


Link to post
Share on other sites
Hanne
20 hours ago, Ken Roy said:

You should then update the information using the TNG Admin > Custom Event Types.  Note that not all imported events should be marked as Accept.  For example _UID  should probably left as Ignore.

Add your translations using the Other Languages section of the Admin > Custom Event Types

 

 

Hi Ken,

Thanks for your answer.

I am ready to do everything... I will try that on the test database and come back with a result. It will take some hours because it takes a long time to copy and paste the translations into the fields in the TNG interface.

Share this post


Link to post
Share on other sites
Ken Roy

Hanne,

I do not have too much time to spend, but before you do the all the updates you want, I would

* First use the Import Custom Event Types only

* Second, review the Admin Custom Event Types and decide which one you want to accept and which you want to leave as Ignore

* Then you could update a couple of those you want to Accept with your language translation displays using the TNG Admin interface

* You could then view the database table and possibly export it so you could do the updates like you tried to do before without messing everything up

Share this post


Link to post
Share on other sites
Hanne

Hi Ken,

Thanks a lot for your  interest

I deleted everything about eventtypes in phpMyAdmin and in the TNG interface. And then I started¬† from an end - and I am not sure how it happend but 15 minutes ago I have realised that it works in all three languages. I am very, very satisfied! I don't know how many hours I have spent on this project ūüėä If you are interested an example can be seen here: https://test-tng.stegemueller.dk/getperson.php?personID=I630&tree=HBS

I do not understand why tng_eventtypes is still empty (0 records). Where are the language  informations/translations stored?

Is the best way to get my data to the live site to make a clone?

****

I had made a list with the process steps so maybe others could use it, but it grew to long and difficult to understand, so I gave it up again.

Share this post


Link to post
Share on other sites
Ken Roy
2 hours ago, Hanne said:

I do not understand why tng_eventtypes is still empty (0 records). Where are the language  informations/translations stored?

Sounds like you are not looking at the correct database.   The translations are saved in the tng_eventtypes table.  So if the table is empty (0 records), how can you mark the tread as solved?

 

Share this post


Link to post
Share on other sites
Hanne

You are right. I actually did look in the wrong database.

After I last cloned the live site to the test site I did not edit the database name on the test site.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×