Page 2 of 2

Re: Rich Text font detection

Posted: 07 Jan 2023 18:11
by David2416
Hi Mark,

Both changes made, second is a good idea. Thanks.

Re: Rich Text font detection

Posted: 11 Feb 2023 15:11
by jimlad68
Mark:
I have noticed that if a Note is empty, but exists (it can be seen on the All" tab, I think that means it is not null) and is Rich Text, your plugin does not detect it. If I add a character it does, then remove same and it does not.

I originally came to this as I thought an empty Note would be deleted after restarting FH, and eventually twigged that being rich text (not even with a < in it), it only "appeared" to be empty.

Anyway, I am still looking for a method to find an "empty" rich text note with no < in it.
- I have tried many LUA patterns.
- I cannot work out a query.

The only method I have found is a Fact Query with a column for %FACT.NOTE2[1]%. Then delete all the empty NOTEs, most of these are "null" but FH advises how many "empty" ones have been deleted.

Re: Rich Text font detection

Posted: 11 Feb 2023 15:35
by jimlad68
Mark, apologies, it seems to be working now for the empty NOTE, so my search is over!!!!!

Re: Rich Text font detection

Posted: 11 Feb 2023 16:29
by tatewise
Jim, you correctly say that FH does not remove an empty Rich Text Note field when closed and reopened.
Whereas a plain text empty Note field (or any other empty field) is removed when FH is closed and reopened.
IMO that inconsistency should be reported to CP.

It is especially bad practice because the _FMT tag which is causing the Note to be retained is not easily visible.

Even though the _FMT tag is not easily visible it is valid in a Note data reference.
i.e. %INDI.NOTE2._FMT% is valid and if it exists identifies a Rich Text Note (at the record level in this case).

So, for example, in a Fact Query an empty Rich Text Note can be detected with the Rows tab filter:
Add if =IsTrue( (%FACT.NOTE2% = "") and Exists(%FACT.NOTE2._FMT%) ) is true

Re: Rich Text font detection

Posted: 11 Feb 2023 17:22
by Jean001
Please do report this to CP.

This is one of the problems with Rich Text that I reported to them last year (although I worded it differently). At one stage, it was noticeable when looking at the Note box because the cursor was sitting on the 'second line'. The last update stopped that happening.

My project is now littered with these 'empty' notes. I do not use Rich Text (other than text copied from FHUG to a Note Record) but I know what is causing the problem in my case: text from a Fact's 'Auto-create Note'. In those some characters (that I have used for years) is triggering Rich Text. Mostly when recording a fact I delete that text (usually it's an aide-memoire to me) but the unseen formatting remains.

Re: Rich Text font detection

Posted: 11 Feb 2023 17:37
by jimlad68
Thanks Mike, that works treat, I'm not up to date with the _FMT%.
For anyone attempting this don't forget the is true is entered separately (I know it is standard but caught me out!)
e.g.
Condition = Add if
Expression =IsTrue( (%FACT.NOTE2% = "") and Exists(%FACT.NOTE2._FMT%) )
that gives the automatic popup Operator is true

Re: Rich Text font detection

Posted: 11 Feb 2023 17:58
by tatewise
Jim, discovering the _FMT tag needs an inspection of the GEDCOM file.
It is effectively equivalent to the Rich Text tick option in the plain text editing window.
The plain text editing window is opened by holding Ctrl + Alt while double-clicking the Note box.
Only if the Rich Text option is ticked will the _FMT tag exist subsidiary to the NOTE2 tag.

Jean, when deleting the text, open the plain text editing window as explained above and untick the Rich Text option.
Then the Note will get automatically removed when FH is closed and opened.
You can also use the All tab to delete the Note item too.
However, it should be fixed by CP to be consistent.

Re: Rich Text font detection

Posted: 11 Feb 2023 18:03
by Jean001
Thank you Mike.

I was doing that, but there are too many and it became tiresome. I am just hoping that eventually CP sorts it out.

Re: Rich Text font detection

Posted: 11 Feb 2023 18:27
by Mark1834
Most of these issues can be fixed with fairly simple plugins, but I’m deliberately not posting anything other than the basic rich text detection as it’s CP’s responsibility to address these inconsistencies. Ideally, plugins should provide additional “nice to have” features, not fix program bugs.

Re: Rich Text font detection

Posted: 11 Feb 2023 19:00
by tatewise
That is a good reason for Jim to report it to CP.
Since outstanding reports are not visible to users, they can claim they don't know if a bug has been reported before.
Surely, this one can't be difficult to fix.

Re: Rich Text font detection

Posted: 11 Feb 2023 22:46
by jimlad68
By popular demand:
Ticket #895945 Empty Rich Text Note not removed after FH restart

Another issue with unwanted Rich Text items.
for background see FHUG viewtopic.php?p=134108&sid=c37fc6bb8258 ... f7#p134098
onwards.
Basically: If a Rich Text Note field is "emptied, FH does not remove the Rich Text Note when FH is closed and reopened.
Whereas a plain text empty Note field (or any other empty field) is removed when FH is closed and reopened.

Once again, unwanted Rich Text items are cluttering up the Database/Gedcom.
In this instance, if a 2nd Note field is created/exists, it is hidden in the Property Facts Tab by the empty Rich Text Note. Although as ever, it can be seen in the All Tab.

Re: Rich Text font detection

Posted: 12 Feb 2023 00:01
by Jean001
Thank you Jim.

The ramifications get more and more involved.

Let us hope that it is resolved soon.