- Posts: 17
Question [SOLVED] Media items location
- sridharb
- Topic Author
- Offline
- New Member
I have migrated a old PGV install to webtrees. The information migrated after help from Greg.
I am facing issues with the media items.
Previously, they used to be in the media folder.
Should I put them in the same heirarchy under data (seems to be what I have found looking around)? So, I have C:/webtrees/data/media/Surname/First/image1.jpg
That doesn't seem to work.
It says that it cannot find media/Surname/First/image1.jpg when I navigate to that individual.
Please help.
Please Log in or Create an account to join the conversation.
- bertkoor
- Offline
- Platinum Member
- Greetings from Utrecht, Holland
Can you try Surname/First/image1.jpg
instead of media/Surname/First/image1.jpg
so without media/
stamboom.BertKoor.nl runs on webtrees v1.7.13
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
I should also note that this is running on windows. There may be some path issues on that account.
I will try this. In the configuration of the family tree, the media location item is given as /data (in gray) and media/ in the text field. I thought that it meant that it should be in webtrees/data/media... I have tried placing the media files also in webtrees/media... and webroot/media... They report the same error.
Regards,
Sridhar
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
You have a media folder (in the family tree preferences). e.g. "data/media/"
You have a media filename (in the gedcom record). e.g. "photos/grandpa.jpeg"
You jon them together to find the location on disk. e.g. "data/media/photos/grandpa.jpeg"
In PGV (and webtrees <= 1.3) you could include parts of the media folder in the media filename.
If the file could not be found, the code would try to find parts of the filename and folder that overlap, and try to remove them.
So, if your media file was "media/photos/grandpa.jpeg" (with an extra "media" prefix), then it would try
data/media/media/photos/grandpa.jpeg.
data/media/photos/grandpa.jpeg.
This meant that you could store this media file in either of these two different locations.
> In the configuration of the family tree, the media location item is given as /data (in gray) and media/ in the text field. I thought that it meant that it should be in webtrees/data/media...
This is correct.
Your screenshot only contains half the information we need. You don't show us the details of one of these media records.
My guess is that your media records also contain an extra "media/" in the filenames.
If this is the case, then webtrees has an import option to fix this.
Export your tree to a GEDCOM file.
Then import it, and put "media/" into the remove-media-path option.
This will strip leading path names in media objects.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
1 FILE media/Ananthanpillai/Srinivasan/Switzerland 056.jpg
BTW, I have tried webtrees/data/media/media/Ananthanpillai/Srinivasan/Switzerland 056.jpg. That also doesn't work. Could it be the spaces in the filename? I tried only with this file - I do have other media entries without spaces.
I will try the importing/stripping of media option and keep the folder heirarchy as webtrees/data/media/Ananthanpillai/Srinivasan/Switzerland 056.jpg
Regards,
Sridhar
[BTW, responding to the e-mail doesn't seem to post to the forum]
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
This is the cause of the problem.
You need to remove the leading /media
The import option that I mentioned will do this.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
I reimported. I see that the media elements have the leading media/ stripped from them.
The file data/media/Ananthanpillai/Srinivasan/Switzerland 056.jpg exists. Still same result (server code 500 as shown earlier.
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Not found would be 404
webtrees is unable to generate the thumbnail image.
Reasons could include
1) file permissions on the /data folder (and subfolders)
2) insufficient memory allocated to PHP
3) missing PHP graphics library (need GD or IMAGICK)
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
How/where do I configure GD/imagemagick? I have the imagick extension loaded, btw.
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
Could it be related to the problems I am having with display?
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
I've just submitted a fix into github.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
I just added a name to this media item (kept the same file/path) and saved it.
I am able to download it, but it still shows me the pink (salmon?) 500 as before.
What could be causing the display issue?
Thanks,
Sridhar
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Are you 100% certain?
The code that creates this "500 image" writes an error message to the logs first.
Here's the code that does it:
github.com/fisharebest/webtrees/blob/2.0...roller.php#L227-L229
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
I have migrated from php 5.6.40 to 7.3.x practically by reusing the same configuration file. Is there anything that I am missing wrt configuration that is not set?
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
Tons of Cannot create thumbnail PHP Fileinfo extension must be installed/enabled to use Intervention Image.
Will try the needful and report back.
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
I've added it to the list of checks on the installer and the control-panel.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- sridharb
- Topic Author
- Offline
- New Member
- Posts: 17
Please Log in or Create an account to join the conversation.