fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
462 stars 299 forks source link

PGV Wizard: #1233

Closed jerry1970 closed 7 years ago

jerry1970 commented 7 years ago

Not sure how to read this error I got during the PGV wizard:

/home/jvkooten/domains/jvkooten.info/public_html/webtrees/app/Fact.php:69
Invalid GEDCOM data passed to Fact::_construct(1544 VX Zaandijk) #0 /app/GedcomRecord.php:108
InvalidArgumentException("Invalid GEDCOM data passed to Fact::_construct(1544 VX Zaandijk)")
#1 /app/GedcomRecord.php:84 parseFacts() #2 /app/Functions/FunctionsImport.php:712
__construct('R3', '0 @R3@ REPO 1 NAME Burgerlijke…', [NULL], [Tree])
#3 /import.php:214 importRecord('0 @R3@ REPO 1 NAME Burgerlijke…', [Tree], false) 

I think a good thing for the wizard would be to move stuff it cannot import to a text field so I can check it later, but at least continue.

How do I proceed?

Thanks!

jerry1970 commented 7 years ago

I edited the original GED file, found and corrected the error, but the error still occurs.

I assume the wizard creates a copy of the GED file first? What file should I edit? Or how can I restart the wizard?

fisharebest commented 7 years ago

Or how can I restart the wizard?

Delete the tree from the "manage family trees" page. If you are unable to do this, delete all rows from the table wt_gedcom_chunk.

This is not a problem with the transfer wizard. It correctly copied all the data into webtrees. The GEDCOM data was invalid in a way that webtrees couldn't understand.

1) what exactly was the invalid data? 2) the problem may have already been fixed in the development code.

fisharebest commented 7 years ago

Or how can I restart the wizard?

Delete the tree from the "manage family trees" page. If you are unable to do this, delete all rows from the table wt_gedcom_chunk.

This is not a problem with the transfer wizard. It correctly copied all the data into webtrees. The GEDCOM data was invalid in a way that webtrees couldn't understand. You would get the same error if you imported the GEDCOM file directly into webtrees.

1) what exactly was the invalid data? 2) the problem may have already been fixed in the development code.

jerry1970 commented 7 years ago

There was a carriage return in a field that was not supposed to be there so the gedcom record started with data instead of the regular level and type. I removed the carriage return and saved the ged file but now I need to tell the wizard the file has been changed.

How do I remove the tree from the admin_trees_manage.php page? I can remove the wt_gedcom_chunk records, no problem, but the way you said it seems like it was better to remove it from the page.

Thanks for the quick reply!!

fisharebest commented 7 years ago

How do I remove the tree from the admin_trees_manage.php page?

There should be a "Delete" link. If you don't see it, delete the data in the DB.

jerry1970 commented 7 years ago

No delete link... image I'll truncate the table.

jerry1970 commented 7 years ago

After truncating the table the error message was replaced by several links including 'delete'. How can I start the wizard again? Or should I just create a tree and import the gedcom? Will that give me everything from the PGV instance?

fisharebest commented 7 years ago

the error message was replaced by several links including 'delete'.

That's the delete link.

The wizard will only run when there are zero trees (and only one user) to prevent accidental data loss.

Delete the tree, and the wizard option will reappear.

jerry1970 commented 7 years ago

Sorry, no wizard link... image

fisharebest commented 7 years ago

The wizard will only run when there are zero trees (and only one user)

I guess you imported other users as well as the tree(s).

Either delete the users using the control panel. Or if you have thousands of them, just delete the database, the file data/config.ini.php and start again.

jerry1970 commented 7 years ago

Ah yes, users were imported as well. Correctly, I might add. :) About 30 users, so no big deal. I cannot go into user management when there is no tree, so I'll delete the database and data/config.ini.php. Thanks!

jerry1970 commented 7 years ago

It worked, thanks!

The gedcom had media files like this: 1 FILE media/blah.jpg so I am copying the pgv /media folder to the webtrees /media folder. Unfortunately, the file /webtrees/data/media/blah.jpg is on the server but webtrees says it cannot find it. The field wt_media.m_filename for this file contains media\blah.jpg.

The filename does contain spaces. Could that be it?

fisharebest commented 7 years ago

The gedcom had media files like this: 1 FILE media/blah.jpg so I am copyin

In PGV, the path media/ was optional, and both media/blah.jpg and blah.jpg point to the same file. This means that all media management functions must search every file twice, and this is slow on large sites. In webtrees, the FILE record must be exactly the name of the file.

You need to strip off this prefix. Otherwise webtrees will look for data/media/media/blah.jpg.

1) export the tree to a GEDCOM file. 2) import the GEDCOM file, and select the "Remove media path" option and remove media/

jerry1970 commented 7 years ago

It worked, awesome!

It appears you could use a Dutch translation?

I am also very interested to make a theme using a modern style. Quite used to work with uikit ( https://getuikit.com/ ) and like their style so I'll see if I can turn that into a theme...

Thanks!!

fisharebest commented 7 years ago

It appears you could use a Dutch translation?

The Dutch translation is 100% complete. https://translate.webtrees.net/projects/webtrees/webtrees-1-7/nl/

If you aren't seeing it, you have a different problem.

jerry1970 commented 7 years ago

I didn't see it in the github tree but downloaded the files from the link you gave and it works perfectly. Thanks!