* Clone Any Record
- LornaCraig
- Megastar
- Posts: 2991
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Clone Any Record
I have recently started using the Clone Any Record plugin and find it very useful for creating a set of similar Source Records. Thank you Peter for providing this plugin.
I normally use a template Source Record with some fields left blank and without any linked multimedia. However I noticed that the description of the plugin says that the template record can contain links to other records, so I experimented with a template which had a linked multimedia record. The cloning worked as expected and the new record had the same link to the multimedia record. Switching between the template record and clone record in the Property box, on any tab, shows them identical at this point (apart from record ID, of course) and when the Multimedia record is viewed in the Multimedia window it shows both of the linked records in the ‘Linked Records and Notes’ section. All good so far.
However I have discovered that if the original, template, record had a ‘link to face’ (in this case a link to an area in the page of a parish register) then when the Multimedia record is viewed in the Multimedia window this link-to-face has been replaced, for the template record, with a simple link to the whole image. (The link-to-face is retained in the new clone record.) Returning to view the template record in the Property box now shows, on the multimedia tab, that the link is to the whole image.
This won’t be a problem because I will not normally use a template record which has linked media. But the fact that the link to the template record is changed seems wrong. Can anyone shed any light?
I normally use a template Source Record with some fields left blank and without any linked multimedia. However I noticed that the description of the plugin says that the template record can contain links to other records, so I experimented with a template which had a linked multimedia record. The cloning worked as expected and the new record had the same link to the multimedia record. Switching between the template record and clone record in the Property box, on any tab, shows them identical at this point (apart from record ID, of course) and when the Multimedia record is viewed in the Multimedia window it shows both of the linked records in the ‘Linked Records and Notes’ section. All good so far.
However I have discovered that if the original, template, record had a ‘link to face’ (in this case a link to an area in the page of a parish register) then when the Multimedia record is viewed in the Multimedia window this link-to-face has been replaced, for the template record, with a simple link to the whole image. (The link-to-face is retained in the new clone record.) Returning to view the template record in the Property box now shows, on the multimedia tab, that the link is to the whole image.
This won’t be a problem because I will not normally use a template record which has linked media. But the fact that the link to the template record is changed seems wrong. Can anyone shed any light?
Lorna
- PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Re: Clone Any Record
Thanks, Lorna. I'm glad you're finding the plugin useful; you seem to be using it for exactly the purpose I had in mind.
However, try as I might, I have not been able to reproduce the problem you mention. I have done a Link to Detail for part of a Multimedia image linked to a Source record. I've then made a clone of that Source record. I find that both these Source records behave identically in all the FH windows and, having saved the file, the GEDCOM details for both are identical (apart form the IDs).
However, try as I might, I have not been able to reproduce the problem you mention. I have done a Link to Detail for part of a Multimedia image linked to a Source record. I've then made a clone of that Source record. I find that both these Source records behave identically in all the FH windows and, having saved the file, the GEDCOM details for both are identical (apart form the IDs).
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)
- LornaCraig
- Megastar
- Posts: 2991
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Re: Clone Any Record
Have you tried viewing the Multimedia record itself in the Multimedia window, after cloning the Source record? It seems crazy but it is only then that the problem becomes apparent. If I click on each of the Linked Records in turn in the panel in the lower left of the MM window, a rectangle appears as expected within the image when I click on the new clone record, indicating the selected area linked to, but does not appear when I click on the original template record. Then viewing the template record's MM tab in the Property box shows the full image on that tab, instead of the detail image.
I have also tried having more than one link to the template record: a simple link and a couple of 'detail' links. When viewing in the MM window and clicking each link in turn in the lower left panel, all these links show as simple links although, again, the new clone record retains the detail links.
By the way, I use 'Add link to face' in the MM window, rather than 'Link to Detail' in the Edit Media Item box, but I doubt that could make any difference as they are two methods of achieving the same thing.
The explanation is probably simple but eludes me at the moment!!
I have also tried having more than one link to the template record: a simple link and a couple of 'detail' links. When viewing in the MM window and clicking each link in turn in the lower left panel, all these links show as simple links although, again, the new clone record retains the detail links.
By the way, I use 'Add link to face' in the MM window, rather than 'Link to Detail' in the Edit Media Item box, but I doubt that could make any difference as they are two methods of achieving the same thing.
The explanation is probably simple but eludes me at the moment!!
Lorna
- tatewise
- Megastar
- Posts: 27080
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Clone Any Record
The explanation relates to the unusual two-way linking between the Original Record and a Multimedia Record where Link to Face/Detail applies.
Many other two-way links apply, such as between Husband, Wife & Children Individual Records and their Family Record, and when cloned, FH ensures the two-way links are cloned too.
So when you clone a Family Record you will find the Individual Records are updated to link to both the original and the cloned Family Records.
(FH manages all such family links perfectly. FH only allows two Spouses in a partnership/marriage. FH deletes redundant links.)
This is not happening with the two-way Link to Face/Detail Link/Notes.
The Original Record such as a Source Record has a SOUR.OBJE._ASID 8 tag where the number 8 identifies which Multimedia Record > Link/Note holds the Link to Face/Detail co-ordinates.
The Multimedia Record has the OBJE.NOTE._ASID 8 and OBJE.NOTE._AREA {10,253,97,350} tags to define the Link to Face/Detail.
When the Source Record is cloned the SOUR.OBJE._ASID 8 tag is copied, and temporarily sometimes the same Link to Face/Detail is visible via both Source Records.
BUT this is invalid GEDCOM because the Multimedia Record must have two different numbered OBJE.NOTE._ASID tags linking back to two different records.
So at some point FH tries to rectify matters by changing the _ASID number, but it does not clone the Link to Face/Detail co-ordinates.
Arguably this is a bug in FH. There is a related bug when records are deleted (in Split Tree, or Export GEDCOM, or manually) that leaves behind redundant Link/Notes in Multimedia Records.
The only workaround would be for the Plugin to recognise this special case, create a new _ASID number, use it in the cloned record tag, and copy the Link/Note with this new _ASID number in the Multimedia Record, repeating as necessary for each such link.
Many other two-way links apply, such as between Husband, Wife & Children Individual Records and their Family Record, and when cloned, FH ensures the two-way links are cloned too.
So when you clone a Family Record you will find the Individual Records are updated to link to both the original and the cloned Family Records.
(FH manages all such family links perfectly. FH only allows two Spouses in a partnership/marriage. FH deletes redundant links.)
This is not happening with the two-way Link to Face/Detail Link/Notes.
The Original Record such as a Source Record has a SOUR.OBJE._ASID 8 tag where the number 8 identifies which Multimedia Record > Link/Note holds the Link to Face/Detail co-ordinates.
The Multimedia Record has the OBJE.NOTE._ASID 8 and OBJE.NOTE._AREA {10,253,97,350} tags to define the Link to Face/Detail.
When the Source Record is cloned the SOUR.OBJE._ASID 8 tag is copied, and temporarily sometimes the same Link to Face/Detail is visible via both Source Records.
BUT this is invalid GEDCOM because the Multimedia Record must have two different numbered OBJE.NOTE._ASID tags linking back to two different records.
So at some point FH tries to rectify matters by changing the _ASID number, but it does not clone the Link to Face/Detail co-ordinates.
Arguably this is a bug in FH. There is a related bug when records are deleted (in Split Tree, or Export GEDCOM, or manually) that leaves behind redundant Link/Notes in Multimedia Records.
The only workaround would be for the Plugin to recognise this special case, create a new _ASID number, use it in the cloned record tag, and copy the Link/Note with this new _ASID number in the Multimedia Record, repeating as necessary for each such link.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- LornaCraig
- Megastar
- Posts: 2991
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Re: Clone Any Record
Wow! No wonder the explanation eluded me. Thanks for looking into this, Mike, with your usual expertise.
As I said in my original post, it is not likley to be a nuisance because I won't normally be cloning a record with multimedia already linked.
I am reassured to find that I was not imagining the 'problem' and will continue to use Peter's very useful plugin. Thanks to both of you.
As I said in my original post, it is not likley to be a nuisance because I won't normally be cloning a record with multimedia already linked.
I am reassured to find that I was not imagining the 'problem' and will continue to use Peter's very useful plugin. Thanks to both of you.
Lorna
- PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Re: Clone Any Record
Wow indeed! When I rechecked in FH later, the original Source record had indeed lost its "link to face". But this was after I had saved the GEDCOM from FH; and in that GEDCOM file, both original and cloned Source records had the same SOUR.OBJE._ASID n tag. A further save of the GEDCOM file revealed that the _ASID n tag had gone from all but the last-cloned Source record.
Mike is of course correct that there are two-way links between Individual records and Family records, not only in FH but also in the underlying GEDCOM where an Individual record can have INDI.FAMC @Fn@ and INDI.FAMS @Fn@ tags while the corresponding Family records must have matching reverse tags FAM.HUSB @In@, FAM.WIFE @In@, and FAM.CHIL @In@.
However, isn't the situation different with links to Multimedia records? In the GEDCOM file a Source record can have links to none, one, or many Multimedia records represented by tags SOUR.OBJE @On@. But there are no tags in the GEDCOM file for the Multimedia record to define reverse links to any other records; any GEDCOM tags such as OBJE.SOUR @Sn@ are only ever for identifying a Source record for the Multimedia object, not vice versa.
The tag pairs OBJE.NOTE._ASID n and OBJE.NOTE._AREA {x1,y1,x2,y2} are unique only within their own Multimedia record; OBJE.NOTE._ASID n can occur many times within a GEDCOM file with the same value of n. Thus it cannot be the _ASID number alone that identifies the relevant Multimedia record, but the combination of _ASID number and Multimedia XREF within the SOUR.OBJE @On@._ASID n tag. Provided this combination is unique (and no amount of cloning would change that uniqueness) I can see no reason for FH to prevent two different Source records from linking to the same area within the same Multimedia record (and using the same _ASID number). I'm not sure how that could be "invalid GEDCOM". I can see that FH design might be aimed at preventing the link of the same face to more than one person, but otherwise it seems an unnecessary restriction.
Mike is of course correct that there are two-way links between Individual records and Family records, not only in FH but also in the underlying GEDCOM where an Individual record can have INDI.FAMC @Fn@ and INDI.FAMS @Fn@ tags while the corresponding Family records must have matching reverse tags FAM.HUSB @In@, FAM.WIFE @In@, and FAM.CHIL @In@.
However, isn't the situation different with links to Multimedia records? In the GEDCOM file a Source record can have links to none, one, or many Multimedia records represented by tags SOUR.OBJE @On@. But there are no tags in the GEDCOM file for the Multimedia record to define reverse links to any other records; any GEDCOM tags such as OBJE.SOUR @Sn@ are only ever for identifying a Source record for the Multimedia object, not vice versa.
The tag pairs OBJE.NOTE._ASID n and OBJE.NOTE._AREA {x1,y1,x2,y2} are unique only within their own Multimedia record; OBJE.NOTE._ASID n can occur many times within a GEDCOM file with the same value of n. Thus it cannot be the _ASID number alone that identifies the relevant Multimedia record, but the combination of _ASID number and Multimedia XREF within the SOUR.OBJE @On@._ASID n tag. Provided this combination is unique (and no amount of cloning would change that uniqueness) I can see no reason for FH to prevent two different Source records from linking to the same area within the same Multimedia record (and using the same _ASID number). I'm not sure how that could be "invalid GEDCOM". I can see that FH design might be aimed at preventing the link of the same face to more than one person, but otherwise it seems an unnecessary restriction.
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)
- LornaCraig
- Megastar
- Posts: 2991
- Joined: 11 Jan 2005 17:36
- Family Historian: V7
- Location: Oxfordshire, UK
Re: Clone Any Record
I seem to have sparked a very technical discussion here!
I can follow the general principles you are both talking about, and the bottom line seems to be that there is a delayed-reaction bug in FH after the cloning has taken place. Whether this is because FH tries to fix a problem but doesn't fix it completely (as Mike suggests) or because no fix is needed (as Peter suggests, I think) is a bit beyond me. I will leave it to Mike and Peter (and Simon?) to decide.
Mike said:
Thanks to both for your detailed comments.
I can follow the general principles you are both talking about, and the bottom line seems to be that there is a delayed-reaction bug in FH after the cloning has taken place. Whether this is because FH tries to fix a problem but doesn't fix it completely (as Mike suggests) or because no fix is needed (as Peter suggests, I think) is a bit beyond me. I will leave it to Mike and Peter (and Simon?) to decide.
Mike said:
Fortunately this doesn't cause any problems, but I have noticed it and thought it odd.There is a related bug when records are deleted (in Split Tree, or Export GEDCOM, or manually) that leaves behind redundant Link/Notes in Multimedia Records.
Thanks to both for your detailed comments.
Lorna
- tatewise
- Megastar
- Posts: 27080
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Clone Any Record
Peter is absolutely correct that the Multimedia linkage is different from the Family links, but when discussing them with Simon he thinks of them as two-way links, and applies similar rules.
Since the _ASID are FH custom tags, the GEDCOM rules are embedded in FH, and it only seems to allow one link per _ASID number.
Remember that not only the Link to Face/Detail co-ordinates, but also the Caption Note is associated with the link.
In hindsight, I suspect it would have better if FH had used a standard Record Id style two-way link (like Family/Individual Records) which could have been managed more reliably using similar strategies.
I think the ball is now in Simon's court.
Since the _ASID are FH custom tags, the GEDCOM rules are embedded in FH, and it only seems to allow one link per _ASID number.
Remember that not only the Link to Face/Detail co-ordinates, but also the Caption Note is associated with the link.
In hindsight, I suspect it would have better if FH had used a standard Record Id style two-way link (like Family/Individual Records) which could have been managed more reliably using similar strategies.
I think the ball is now in Simon's court.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry