Webtrees problems

Webtrees is a fork of PhpGedView, an excellent genealogy program. It ha a big problem: uploading and setting multimedial files.
It’s often a terrible waste of time: a very complicated way to upload files.

workaround

  • You can try to upload images (if you work in localhost and you know what you are doing) in this way:
  • 1. symlink an image to /media folder in /data webtrees folder.
  • 2. add that image file in phpmyadmin (your webtrees db) “media” and “media_file” tables (you have to set a number, such as X110).
    3. add to “individuals” the id of that file, with a code like “1 OBJE @X110@” at the bottom of the field i_gedcom.
  • 4. Now, in webtrees grafical view you has now to (pretend to) modify (nothing modifying, in fact) and save this modification.
  • 5. You could have also to save the modification date (saving the proposed one).

caveat

  • a. The file symlinked must have rights permissions (owner rw, group and others only r).
  • b. no avif: only jpg or webp are allowed.

You should now see the expected image within the page of that individual

Webtrees mysql error

It can happen that Webtrees gives an error such the following


SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value 

You can try to solve it, assigning an auto-increment default value to that field, in PhpMyAdmin