Text Disappearing from Rich Text Field

I have a database that is exhibiting very strange, intermittent behaviour.

A request form is created in the database. An email is sent to the requestor’s manager for approval. The manager can approve, decline or modify the request.

Intermittently (and with no rhyme or reason that I can detect), when the Manager approves, the Task Description (a rich text field) is emptied. This happens only with requests that have screen prints in the Task Description field. But not all of them. (Documents with plain text, tables, attachments are not impacted.)

I watched a manager approve three requests (and stepped through the approval code with debug on from her desk) - all with screen prints. Two were fine, one had Task Description deleted.

The Task Description is a required field - you can’t save a request without having something in the field.

Here is the code being executed when a request is approved:


Sub Click(Source As Button)

Dim s As New NotesSession

Dim ws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim uidoc As NotesUIDocument

Dim doc As NotesDocument



Set db = s.CurrentDatabase

Set uidoc = ws.CurrentDocument

'Stop if status is not New

If uidoc.FieldGetText("LogStatus") <> "New" Then

	Msgbox "This task has already passed the approval stage."

	continue = False

	Exit Sub

End If

'Check that user is allowed to approve

OKtoApprove = "no"	

mname = uidoc.FieldGetText("Manager")

uname = s.CommonUserName

If mname = uname Then

	OKtoApprove = "yes"

Elseif uidoc.FieldGetText("RequestType") = "Work Cycle" And uidoc.FieldGetText("WorkCycleApproverFull") = s.UserName Then

	OKtoApprove = "yes"

Else

	UserRoles = Evaluate("@UserRoles")

	Forall role In UserRoles		

		If role = "[Grand Poohba]" Then

			OKtoApprove = "yes"

		End If

	End Forall

End If



If OKtoApprove = "no" Then

	Msgbox "You are not an allowable Approver for this task.  Only " & uidoc.FieldGetText("Manager") & " or an Administator may approve this task"

	continue = False

	Exit Sub

End If



Set doc = uidoc.Document

Call UpdateStatusHistory(doc, "Approved", "n/a", "n/a")



doc.LogStatus = "Approved"



Call doc.Save(True, True)



Call uidoc.Close

End Sub


Just before the doc.Save, I can look at the Items in Doc and see that there is contact in the Task Description field.

There have been no design changes to the database to trigger this issue.

The last change to the server was a few days before the problem was detected. That change was to install R8.0.2 FP3 Hotfix65. I’ve read through the notes for the Hotfix and I don’t see anything that looks related to RTF functionality.

I’m at a loss on where to look next. I can’t reproduce the issue.

Any and all recommendations are welcome.

Subject: Re: Text Disappearing from Rich Text Field

I finally stumbled across the answer.

It appears that Fixpack 3 Hotfix 65 has caused a little ‘quirk’.

There’s a rich text field on the form. The rich text field has the security option “Must have at least Editor access to use” enabled.

The user has Author access to the form. They make and edit* and save the change.

If the rich text field has a screen print** in it, the entire field contents is deleted.

  • I was able to recreate the problem when updating the document via an action button from the UI or when selecting the document from the view.

** Only screen prints cause the error. Attachments, plain or formatted text don’t exhibit the same behaviour.

Our fix was to remove the security option from the rich text field. It was appropriate in our application.

Hopefully this helps someone else out. I will be reporting this to Lotus.