For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the
Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in
General Usage or an appropriate sub-forum.
-
tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
-
Contact:
Post
by tatewise » 14 Jan 2021 14:35
The KB code snippet
Copy Child Branch Fields fails for FH V7 scenarios involving rich text Notes and source citation metafields.
The function CopyBranch(...) needs amending as below:
Code: Select all
function CopyBranch(ptrSource,ptrTarget)
local strTag = fhGetTag(ptrSource)
if strTag == "_FMT" then return end -- Skip rich text format code
if strTag == "_FIELD" then -- Substitute metafield shortcut
strTag = fhGetMetafieldShortcut(ptrSource)
end
local ptrNew = fhCreateItem(strTag,ptrTarget,true)
if ptrNew:IsNull() then return end -- Escape if item not created
fhSetValue_Copy(ptrNew,ptrSource)
CopyChildren(ptrSource,ptrNew)
end -- function CopyBranch
-
ColeValleyGirl
- Megastar
- Posts: 4853
- Joined: 28 Dec 2005 22:02
- Family Historian: V7
- Location: Cirencester, Gloucestershire
-
Contact:
Post
by ColeValleyGirl » 14 Jan 2021 14:50
Mike, please use the KB contact form for corrections such as this -- thanks.
-
tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
-
Contact:
Post
by tatewise » 14 Jan 2021 15:14
OK, but thought it worthwhile publicising here as I don't suppose authors will go checking the KB for changes
-
PeterR
- Megastar
- Posts: 1129
- Joined: 10 Jul 2006 16:55
- Family Historian: V7
- Location: Northumberland, UK
Post
by PeterR » 15 Jan 2021 10:57
Thanks for this update, Mike, which I've now used to revise my old plugin "Clone any Record", following a request from a keen user. However, I am more than a little puzzled by
Copy Child Branch Fields which was updated at least twice yesterday and now contains four occurrences of "
<wbr>".
Peter Richmond (researching Richmond, Bulman, Martin, Driscoll, Baxter, Hall, Dales, Tyrer)
-
ColeValleyGirl
- Megastar
- Posts: 4853
- Joined: 28 Dec 2005 22:02
- Family Historian: V7
- Location: Cirencester, Gloucestershire
-
Contact:
Post
by ColeValleyGirl » 15 Jan 2021 11:10
Fixed (unless Mike says differently).
I know he and Colin had a bit of to-and-fro trying to get it correct...
-
tatewise
- Megastar
- Posts: 27078
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
-
Contact:
Post
by tatewise » 15 Jan 2021 11:17
Sorry. The KB administrator had difficulty understanding what needed updating.
Helen requested I use the KB Contact Form but that upset the script layout indents, etc, adding further confusion.
There only seems to be one <wbr> remaining now. Why not use the KB Contact Form to report that mistake?
-
ColeValleyGirl
- Megastar
- Posts: 4853
- Joined: 28 Dec 2005 22:02
- Family Historian: V7
- Location: Cirencester, Gloucestershire
-
Contact:
Post
by ColeValleyGirl » 15 Jan 2021 11:23
Don't bother logging it -- I've fixed it.