Web based family history software

Question [SOLVED] Media items location

  • sridharb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #1 by sridharb
Media items location was created by sridharb
Hi,

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
  • Platinum Member
  • Greetings from Utrecht, Holland
More
4 years 4 months ago #2 by bertkoor
Replied by bertkoor on topic Media items location
If the computer says it cannot find it, I tend to believe it. So the expected path is not the same as the real path.

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
  • New Member
More
4 years 4 months ago #3 by sridharb
Replied by sridharb on topic Media items location
Thank you for responding.

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
  • New Member
More
4 years 4 months ago #4 by sridharb
Replied by sridharb on topic Media items location
Please see the manage media section shown in the attached image. Those files are in the locations shown in the links. I.e. media/Ananthanpillai/Srinivasan/Switzerland 056.jpg exists at C:/webtrees/data/media/Ananthanpillai/Srinivasan/Switzerland 056.jpg
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #5 by fisharebest
Replied by fisharebest on topic Media items location
In webtrees, media files should be in one exact location.

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
  • New Member
More
4 years 4 months ago #6 by sridharb
Replied by sridharb on topic Media items location
Sorry, the corresponding record in the gedcom file is

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.

More
4 years 4 months ago #7 by fisharebest
Replied by fisharebest on topic Media items location
> 1 FILE media/Ananthanpillai/Srinivasan/Switzerland 056.jpg

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
  • New Member
More
4 years 4 months ago #8 by sridharb
Replied by sridharb on topic Media items location
Sorry, but that didn't solve this.

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.

More
4 years 4 months ago #9 by fisharebest
Replied by fisharebest on topic Media items location
500 is error.

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
  • New Member
More
4 years 4 months ago - 4 years 4 months ago #10 by sridharb
Replied by sridharb on topic Media items location
Ok, but there is nothing in the error log or php-errors. BTW, I am guessing 500 error only from the 500 image shown by webtrees.

How/where do I configure GD/imagemagick? I have the imagick extension loaded, btw.
Last edit: 4 years 4 months ago by sridharb.

Please Log in or Create an account to join the conversation.

  • sridharb
  • Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 4 months ago #11 by sridharb
Replied by sridharb on topic Media items location
I tried to add a media file by hand and I get the following (see image).

Could it be related to the problems I am having with display?
Attachments:

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #12 by fisharebest
Replied by fisharebest on topic Media items location
Thanks for reporting this.

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
  • New Member
More
4 years 4 months ago #13 by sridharb
Replied by sridharb on topic Media items location
Ok, I have updated the code and I am able to edit the media item now.

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.

More
4 years 4 months ago #14 by fisharebest
Replied by fisharebest on topic Media items location
> Ok, but there is nothing in the error log

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
  • New Member
More
4 years 4 months ago #15 by sridharb
Replied by sridharb on topic Media items location
There is nothing in error.log as well as php_errors.log.

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.

More
4 years 4 months ago #16 by fisharebest
Replied by fisharebest on topic Media items location
Control panel -> Logs

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
  • New Member
More
4 years 4 months ago #17 by sridharb
Replied by sridharb on topic Media items location
Thank you.

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.

More
4 years 4 months ago #18 by fisharebest
Replied by fisharebest on topic Media items location
According to the docs, the fileinfo extension is included by default on linux builds, but needs to be enabled via php.ini on windows builds.

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
  • New Member
More
4 years 4 months ago #19 by sridharb
Replied by sridharb on topic [SOLVED] Media items location
Problem solved.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}