* Removing unneeded broken media links

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
avatar
KiwiDigger
Gold
Posts: 17
Joined: 30 Jun 2016 07:58
Family Historian: V6.2
Location: UK

Removing unneeded broken media links

Post by KiwiDigger » 10 Oct 2020 13:40

I wonder if it is possible to remove unneeded broken media links.
After clicking "Tools", then "External File Links", there are a large number of file names with red crosses. These are not needed now as I have corrected the various problems, & the correct file names also appear in the report.
Is there a way of removing the red cross links?

User avatar
tatewise
Megastar
Posts: 18942
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Removing unneeded broken media links

Post by tatewise » 10 Oct 2020 14:05

Run the Check for Broken Media Links plugin to produce a Result Set of the Media records to delete.
Select all the records in 1st Media column and use cog Query Menu > Add Selected Cell Records to Named List...
Open the Named Lists Pane in the Records Window, then right-click chosen Named List and Delete Listed Records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
KiwiDigger
Gold
Posts: 17
Joined: 30 Jun 2016 07:58
Family Historian: V6.2
Location: UK

Re: Removing unneeded broken media links

Post by KiwiDigger » 10 Oct 2020 15:27

Thanks tatewise, worked like a charm!

avatar
Mal
Silver
Posts: 5
Joined: 11 Oct 2020 14:55
Family Historian: V6.2

Re: Removing unneeded broken media links

Post by Mal » 11 Oct 2020 15:34

Prompted by this discussion thread I used the above plugin to check for broken media links in my FH project. One file was listed in the Result Set, but I wasn't sure what to do next.
So I used the Tools menu, selected External File Links... , then scrolled down the list of Files. All of the media files appear to be correctly linked - no red crosses. Clicking the Preview checkbox (in External File Links) shows the thumbnail image for each media file. I'm puzzled.

User avatar
tatewise
Megastar
Posts: 18942
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Removing unneeded broken media links

Post by tatewise » 11 Oct 2020 16:21

Welcome to the FHUG Mal.

In the Result Set that lists the broken link, double-click on the Media record with the paper clip icon.
That will open its Property Box with the File box identifying the path to the missing file.
I would expect it to say File not found in the pane below.

The next step is to try and discover whether that file is retrievable, but first confirm you get the above response.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Mal
Silver
Posts: 5
Joined: 11 Oct 2020 14:55
Family Historian: V6.2

Re: Removing unneeded broken media links

Post by Mal » 12 Oct 2020 09:28

Thank you for the FHUG welcome, Mike.
I did as requested. Everything in Property Box seems normal. Screenshot of Plugin Result Set and Properties Box attached. The Links tab in the Properties Box lists 3 Links.

Image
Attachments
Check for Broken Links.jpg
Check for Broken Links.jpg (85.73 KiB) Viewed 513 times

User avatar
tatewise
Megastar
Posts: 18942
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Removing unneeded broken media links

Post by tatewise » 12 Oct 2020 11:05

Hi Mal,
That has really got me foxed, so could you answer a few questions.

Are all your other media files in the Project's Media folder, or are they elsewhere ?

Does the folder path to your Project or the Project name itself include an unusual character such as % ?

There is only one scenario that might explain the false report and that is fixed in the attached plugin.
So please try the Check for Broken Media Links plugin Version 1.0.1 Date 12 Oct 2020.
Attachments
Check for Broken Media Links.fh_lua
Version 1.0.1 Date 12 Oct 2020
(3.74 KiB) Downloaded 9 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Mal
Silver
Posts: 5
Joined: 11 Oct 2020 14:55
Family Historian: V6.2

Re: Removing unneeded broken media links

Post by Mal » 12 Oct 2020 12:46

Thank you Mike. Responding to your questions:
1. My project files are in the default FH structure. The "problem" media file is in the FH Media Folder with all of my other Media files.
2. Not sure what you mean by folder path %. I'm using the default folders set up by FH when I first installed the software.
3. The project name is "[my surname] Family"
4. The updated (V1.0.1) Plugin gave me the same Result Set as V1.0

Regarding item 2 above. For information, I run FH in a Windows 10 Pro virtual machine using Parallels for Mac. I have been using FH for some time without any problems. When I first installed FH, the program allowed me to choose a location for the FH Project Folders. The location I selected was on my Mac Hard drive, which to date has worked fine.

User avatar
tatewise
Megastar
Posts: 18942
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Removing unneeded broken media links

Post by tatewise » 12 Oct 2020 13:04

I wonder if running in 'Parallels' is the explanation.
The plugin has to take special action if a media filename contains any UTF-8 characters.
That involves a Command Prompt script that maybe 'Parallels' does not support.

Is it possible that the 'apostrophe' in the filename in St Mark's Hull is not an ASCII single prime but a UTF-8 symbol?

Try running the attached variant of the plugin that reports when it detects UTF-8 characters.

If that is the case then the only workaround is to rename the file to use a single prime from your keyboard.
Attachments
Check for Broken Media Links.fh_lua
Version 1.0.1 Date 12 Oct 2020 Variant
(3.88 KiB) Downloaded 6 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Mal
Silver
Posts: 5
Joined: 11 Oct 2020 14:55
Family Historian: V6.2

Re: Removing unneeded broken media links

Post by Mal » 12 Oct 2020 16:52

Well done Mike, I think you are on to something. Your Plugin Variant produced an error message:

Plugin Variant Error Message.png
Plugin Variant Error Message.png (72.54 KiB) Viewed 438 times

Looking at my Media Folder I've discovered 2 Media Files with an "apostrophe". One produces the above error; the other doesn't. The files names include:

a. St Mary's, Hull and
b. St Mark’s Hull, which you've seen before

On cursory glance the "apostrophes" look the same. However, I magnified the text in MS Word and found that they are very different:

Apostrophes.png
Apostrophes.png (32.79 KiB) Viewed 438 times

I certainly typed both of these apostrophes on the original Media Files within the FH Project Media Folder. But why the apostrophe symbols are different is beyond me. There isn't a key on my Mac keyboard that creates the St Mary's variant of the apostrophe.

As you seem familiar with ASCII and UTF-8 characters, and now know that the St Mark's apostrophe triggers the Error Message (but the St Mary's apostrophe doesn't), I am hopeful you know what is causing the error.

I've deferred trying your apostrophe workaround for the moment.

User avatar
tatewise
Megastar
Posts: 18942
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: Removing unneeded broken media links

Post by tatewise » 12 Oct 2020 17:31

I think I can explain how you got the two alternative apostrophes.
The single prime ' is the basic ASCII keyboard symbol and used in the St Mary's variant.
If you hold that key down too long then FH offers the alternative which is the UTF-8 Unicode symbol in the St Mark’s variant.
I have repeated entering that UTF-8 symbol in FH, and the plugin variant reports it.

On a thoroughbred Windows system, both those apostrophe variants are handled by the plugin, but it seems that Parallels does not faithfully support the special Command Prompt feature needed by the plugin for UTF-8 Unicode characters.
There is nothing I can do with the plugin to improve matters.
So the only workaround for you is to change the St Mark’s variant to the ASCII variant in both the Media record and in the filename in File Explorer. Sorry.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
Mal
Silver
Posts: 5
Joined: 11 Oct 2020 14:55
Family Historian: V6.2

Re: Removing unneeded broken media links

Post by Mal » 12 Oct 2020 18:28

Mike - I'm happy with the resolution on the plugin, and the proposed workaround. Many thanks.

Also, grateful for your efforts in producing the Plugin Variant - which definitively pinned down the issue. Kind Regards.

Post Reply