fisharebest / webtrees

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

No images in slideshow #4716

Open SeniorSupportEngineer opened 1 year ago

SeniorSupportEngineer commented 1 year ago

I upgraded my webtrees to 2.1.15, and after that there are no images shown in the slideshow module. Before the upgrade I had no issues with it.

When I view a image from control panel I see

Bestandsnaam: 00001-006161_001.jpg Titel: 00001-006161_001 Mediatype: Formaat:

When I manually change it to Formaat: JPG the image is shown in the slideshow.

But when I import a gedcom from my program (that has not changed or updated) the Formaat is back to empty and the image that I changed manually is not shown in the slideshow.

I will check my export program, maybe there I clicked something wrong. But I do this many times, never had a issue before.

hartenthaler commented 1 year ago

webtrees is now much more conformed to the GEDCOM standard. You should adjust your export program to set the format of your multimedia files.

The GEDCOM standard 5.5.1 says:

MULTIMEDIA_RECORD:= n @XREF:OBJE@ OBJE {1:1} +1 FILE {1:M} +2 FORM {1:1} +3 TYPE {0:1} +2 TITL {0:1} +1 REFN {0:M} +2 TYPE {0:1} +1 RIN {0:1} +1 <> {0:M} +1 <> {0:M} +1 <> {0:1}

You can see that the element FORM is mandatory "{1:1}" for each file. The format depends on the type of that file and is for example JPG or GIF or WAV or PDF, ...

SeniorSupportEngineer commented 1 year ago

Oke, my program exports it at 5.5, before the upgrade of webtrees I did not have a issue.

And a upgrade to a new version of my program cost money :(

fisharebest commented 1 year ago

If FORM is missing, webtrees will extract the extension from FILE.

This is almost certainly a bug in webtrees.

SeniorSupportEngineer commented 1 year ago

Any update when it will be fixed?

SeniorSupportEngineer commented 1 year ago

Currently i fixed it within app/MediaFile.php __construct as last do a check

//Some gedcom files don't have the FORM if ($this->multimedia_file_refn !== '' && $this->multimedia_format === '') { $this->multimedia_format = strtoupper(pathinfo($this->multimedia_file_refn, PATHINFO_EXTENSION)); }