This Help forum is for issues relates to the latest release (1.5.x). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here.

TOPIC: Why webtrees duplicates a media object?

Why webtrees duplicates a media object? 4 years 9 months ago #1

  • Jackie
  • Jackie's Avatar
  • Offline
  • Platinum
  • Posts: 4709
Hello,

I added a new media object using the link *Add a new media object* in the burial GUI. I used *Create a new media object* because the file was listed in *Unused*, and filled in fields *File name on server*, *Format*, *Type*, *Title*, and *Highlighted image*, then saved.

webtrees created @M350@ and never told me @271@ was exactly the same.

Is this normal? Is this intended?

Though, if I upload the file, webtrees tells me the file already exists. But not on unused files.
Last Edit: 4 years 9 months ago by Jackie.
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #2

  • fisharebest
  • fisharebest's Avatar
  • Online
  • Administrator
  • Posts: 11149
It is allowed to have two media objects with the same file.

For example, you could have these two media objects with the same photo:

"Bob, with cousin Joe to his left"
"Joe, with cousin Bob to his right"
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #3

  • Jackie
  • Jackie's Avatar
  • Offline
  • Platinum
  • Posts: 4709
fisharebest wrote:
It is allowed to have two media objects with the same file.

For example, you could have these two media objects with the same photo:

"Bob, with cousin Joe to his left"
"Joe, with cousin Bob to his right"

Thanks Greg,

Hummm, I need to be very cautious.. I may add a new media instead of adding a link to an existing media.
Last Edit: 4 years 9 months ago by Jackie.
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #4

  • Jackie
  • Jackie's Avatar
  • Offline
  • Platinum
  • Posts: 4709
Hi Greg,

But why webtrees allows two files with the exact same name?


My question should have been : "Why webtrees does not tell me that file already exists ?" That way I would have known I may add only a link instead of creating a second Media abject. oops! object. ;-)
@M271@
@M350@

Last Edit: 4 years 9 months ago by Jackie.
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #5

  • fisharebest
  • fisharebest's Avatar
  • Online
  • Administrator
  • Posts: 11149
Where is the best place to add such a check?

It could be quite slow to add this to the admin-media page. We'd need to process every file (to check for duplicates), even though we only display one page at a time.

On the media page? We could add links to the "merge records" page from here.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #6

  • Jackie
  • Jackie's Avatar
  • Offline
  • Platinum
  • Posts: 4709
Thank you Greg for your reply.

Well, I don't have any idea..

Now that I know about the possibility of duplicates, I can live with it. I'll be more careful in the future.
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #7

  • lickity40
  • lickity40's Avatar
I don't know if this is related, but I now find that I have a good number of subjects who have duplicate media entries. I'm not sure how it happened or when. I've been using webtrees for 2 -3 years now so there wasn't an import from gedview.

So, after manually removing some, I thought I'd go back into the admin area where I thought I saw a feature to allow the removal of duplicate entries. Yes, I found it. Batch Update >> Remove Duplicate Links.

But, when I try to use it, it pulls up the records identified with duplicates, but when I click Update or Update All, the frame blanks for about 10 seconds as though it's doing it's thing, but then the first record is displayed again with no change.

Has anyone encountered this?

Thanks!
The administrator has disabled public write access.

Why webtrees duplicates a media object? 4 years 9 months ago #8

  • Jackie
  • Jackie's Avatar
  • Offline
  • Platinum
  • Posts: 4709
Hello,

I don't think it is the same issue as mine.

Batch update could behave the way you describe when you don't have enough memory for the process to complete.

What is your memory limit?

Go to : Administration -> PHPInfo -> go down in the page until you see CORE section -> in that section, you should see memory_limit
The left column is the memory of your webtrees intallation, the right column is the maximum memory of the server allocated to you by your webhost.

You can bring up the limit of webtrees to the limit of the server, if they are not the same.

EDIT : How to bring up the memory limit?
Go to : Administration -> Site configuration -> Memory limit -> click on the number to change it, then save your modifications.
Help text:
By default, your server allows scripts to use xxxM of memory. You can request a higher or lower limit, although the server may ignore this request. If you leave this setting empty, the default value will be used.
Last Edit: 4 years 9 months ago by Jackie.
The administrator has disabled public write access.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Why webtrees duplicates a media object? 4 years 9 months ago #9

  • fisharebest
  • fisharebest's Avatar
  • Online
  • Administrator
  • Posts: 11149
lickity40 wrote:
I don't know if this is related, but I now find that I have a good number of subjects who have duplicate media entries. I'm not sure how it happened or when. I've been using webtrees for 2 -3 years now so there wasn't an import from gedview.

The usual cause of this is ticking the "Keep media objects" option when you import a GEDCOM file.

For the batch update, the algorithm to highlight the differences struggles when there are lots of changes, and requires a lot of CPU/memory. Also, the batch-update itself takes a lot of cpu/memory for large family trees.

If your webhost has insufficient limits for cpu/memory, a common workaround is to install webtrees on your local computer (using MAMP on MacOS, XAMPP on Windows). Here you can set the limits as high as you like. You download your data from your website and load it locally. You run the batch update locally, then update the data back to the website.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.
Powered by Kunena Forum