fisharebest / webtrees

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

V2: mediaobject title not shown #2929

Closed SnarfW closed 2 years ago

SnarfW commented 4 years ago

I still have several media objects with the following format (which I think is old webtrees format) 0 @M112@ OBJE 1 FORM jpg 1 TITL some title 1 FILE filename.jpg

in V1.7 the title is still shown in V2 the title is not shown, but only the filename. Would it be possible to also in V2 show the title instead of the filename for this format?

mpwt commented 4 years ago

According to gedcom 5.5.1 would be correct: 0 @m112@ OBJE 1 FILE filename.jpg 2 FORM jpg 2 TITL some title

fisharebest commented 4 years ago

This is not actually valid GEDCOM.

The FORM and TITL should be subordinate to the FILE.

Here's what the GEDCOM spec says:

1 FILE <MULTIMEDIA_FILE_REFN>
2 FORM <MULTIMEDIA_FORMAT>
3 TYPE <SOURCE_MEDIA_TYPE>
2 TITL <DESCRIPTIVE_TITLE>

Would it be possible to also in V2 show the title instead of the filename for this format?

GEDCOM supports media objects with multiple media files. For example, scans of both sides of a document can be stored together. webtrees 2.0 supports multiple files - webtrees 1.7 did not.

It is possible to use logic such as "if no valid title is found, search for an invalid title".

Indeed, webtrees 1.7 did this - because it assumed there would only be one file, and any title, anywhere in the record, could be used.

But now that we are following the spec more closely, it is a little harder to tolerate invalid data.

Even if we could do this, it would be better to correct your data. Invalid data may get lost if/when you try to transfer your data to another genealogy application.

It should be straightforward to fix this using the "batch update" plugin. I'll take a look and write you some instructions.

SnarfW commented 4 years ago

I understand that this is not a valid GEDCOM format, however, I am pretty sure that they were created by a old version of webtrees (For at least the last 5 yeats I am only using webtrees to edit my data) A batch update plugin would therefore be very helpfull.

fisharebest commented 2 years ago

In 2.1 we have an improved error-check tool. This will identify all these invalid structures, so you can more easily find/fix them.