gedcom download fails on SUBM rec

Bug #1285716 reported by Bert Koorengevel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webtrees
Fix Released
Low
fisharebest

Bug Description

A tree I could "download" in v1.4.3 now fails in v1.5.2. It reports the following message in the .ged file itself:

1 PLAC
2 FORM City, County, State/Province, Country
1 SUBM @SUBM@
<br />
<b>Fatal error</b>:
Uncaught exception 'Exception' with message 'Unrecognized GEDCOM record:
0 SUBM S1
1 NAME xxxx xxxxxxxxxxx
1 ADDR xxxxxxxxx xx
2 CONT xxxx xx xxxxxxxx
1 EMAIL <email address hidden>
1 PHON xxxx-xxxxxxx, Mobiel' in C:\xampp\htdocs\wt143\library\WT\GedcomRecord.php:153
Stack trace:
#0 C:\xampp\htdocs\wt143\includes\functions\functions_export.php(245): WT_GedcomRecord::getInstance('SUBM', '1', '0 SUBM S1?1 NAM...')
#1 C:\xampp\htdocs\wt143\admin_trees_download.php(90): export_gedcom('Noorlander', Resource id #132, Array)
#2 {main}
  thrown in <b>C:\xampp\htdocs\wt143\library\WT\GedcomRecord.php</b> on line <b>153</b>

The SUBM record found at the bottom of the exported file is identical to what's shown in this message. The bizarre thing is that "export" on the same tree is OK!

Revision history for this message
fisharebest (fisharebest) wrote :

You appear to have

0 SUBM S1

This is not a valid GEDCOM record.

It should be

0 SUBM @S1@

"export" is OK, because it simply dumps data from the database. "download" processes the data as GEDCOM, so it can convert line endings, merge pending changes, correct slashes in filenames, etc.

Revision history for this message
fisharebest (fisharebest) wrote :

...of course, I meant

0 @S1@ SUBM

Revision history for this message
Bert Koorengevel (bert-koorengevel) wrote :

So this is a major violation of gedcom structure. No surprise, it was created by FTB. Could you include a check for this in the "Check for Errors" then? Currently it goes unnoticed and breaks functionality.

I also bumped a feature request to have a way to correct it.

Revision history for this message
fisharebest (fisharebest) wrote :

This particular error (missing XREF) is awkward.

We identify records by their XREF. We have no way to identify this record - as it has no XREF.

I've tried importing data with this error - and I can't. I get a fatal error on the import. I guess it was imported using a previous version of webtrees.

The only records that do not have an XREF are HEAD and TRLR.

The importer should skip this record - fix submitted.

Changed in webtrees:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → fisharebest (fisharebest)
Revision history for this message
fisharebest (fisharebest) wrote :

Fix released in 1.5.3

Changed in webtrees:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.