Search This Blog

Showing posts with label Bug. Show all posts
Showing posts with label Bug. Show all posts

Sunday, August 8, 2021

Do not use NotesRichTextItem.ConvertToHTML() or use it but be ready it will be removed in the future release.

 Hi

Just a suggesstion.

Since R9(?) it was possible to use NotesRichTextItem.ConvertToHTML(), see its description here: https://help.hcltechsw.com/dom_designer/9.0.1/appdev/H_CONVERTOHTML_METHOD_NOTESRICHTEXTITEM.html

It was kind of relief to be able to use a native API instead of making those custom solutions based on MIME/DXL/XmlHttpRequest/...

However, later we noticed that every call of NotesRichTextItem.ConvertToHTML() in server agent showed this message in the Domino console: 

        CSRF Init: iNotes_WA_Security_ReturnUrlCheck> c_CSRFReturnUrlCheck: 1

It is very easy to reproduce it. Create an agent which works in server's context (run it from console or by schedule) and write something like Dim s As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim rtItem As NotesRichTextItem Dim html As String Set db = s.Currentdatabase Set doc = db.Alldocuments.Getfirstdocument() '<-- This is a doc with richtextitem Body Set rtItem = doc.Getfirstitem("Body") html = rtItem.convertToHTML() Domino console has to show: [0AB8:0025-08E8] 31-05-2021 16:32:21,71 CSRF Init: iNotes_WA_Security_ReturnUrlCheck> c_CSRFReturnUrlCheck: 1 [0AB8:0025-08E8] 31-05-2021 16:32:21 AMgr: Start executing agent 'testAgent' in 'test\test.nsf' [0AB8:0025-08E8] iNotes Init: Credential Store Configuration not enabled, less secure mode. [0AB8:0025-08E8] 31-05-2021 16:32:22 AMgr: Agent 'testAgent' in 'test\test.nsf' completed execution We have a big database with several RichTextItems in every document and for every such item in every document a scheduled agent does some magic and uses rtItem.convertToHTML() - Domino console spams million of such messages for more than 1 hour.

I contacted HCL regarding this and they said that they forgot to hide this method: it is not supported and will be removed in a future release, though it was reproduced even in R12.


Sunday, October 18, 2020

HCL/IBM Notes does not work well with Segoe UI Emoji font family

 Hey


Let's go straight to the example.

I send email from my Exchange mailbox to my IBM Lotus Notes mailbox and that email contains smiling icon.

Email source (in Outlook) looked like that:

<html xmlns:v="urn:schemas-microsoft-com:vml" (cut some)>
<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
.....
@font-face
{font-family:"Segoe UI Emoji";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
.....
</style></head>
<body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=NO-BOK>Bla bla bla </span><span lang=NO-BOK style='font-family:"Segoe UI Emoji",sans-serif'>&#128522;</span><span lang=NO-BOK><o:p></o:p></span></p></div></body></html>


Here it is what I got in Notes in READ mode (looked good)


However, as soon as I switched email to EDIT mode or clicked REPLY WITH HISTORY the icon disappeared and ? appeared instead.


I think Lotus Notes just does not how to deal with colorful "Segoe UI Emoji" font family but if you know how to fix that - please share. The main issue is that this is a common problem, I mean, if you try to create NotesMIMEEntity programmatically and put there HTML with &#128522; you will get the same result.

------------------------------------------------------------------------------------------
Updated later.

I tested this case more and found some new interesting details.

The email I used for demo above I received as an example from a colleague so when I described the case above I just played with already received email.

When I tried to create an email in Outlook myself and checked its source I didn't find there any HTML codes for the icons - instead I saw this - see below.


I sent the email above to my Notes mailbox.
It looked very good in READ mode and the icons were still usable in EDIT mode though they became black and white.

Read mode above


Edit mode above

So, obviously, the reason of the issue described on the very top is not related to Segoe UI Emoji font family. The reason is that Notes does not know how to render <span lang=NO-BOK style='font-family:"Segoe UI Emoji",sans-serif'>&#128522;</span> in Richtextitem in Edit mode. I do not know how that first email was created so that it contained HTML code &#128522; but it does not really matter.

Btw, the funny thing is that the same email in Gmail looks differently also :-)
Here it is the same email from outside - the last icon is black&white.


This is the same email from inside.






Thursday, July 2, 2020

Critical bug - manual changes on the form are discarded by action in embedded view

Hi

Not sure how I missed this bug for so many years of working with Notes but here it is what I discovered recently:

1) Imagine you have a form with a single field (dialog list) + embedded view.

2) Embedded view has a single action with following simple code


3) Then create a new document with this form, save the document, then change value of a field and click action in embedded view - your last change to the field is reverted to previous value somehow?!
See video:

I found two workarounds to avoid this issue:
1) Call NotesUIDocument.Save() before using doc.replaceItemValue in action of the embedded view


Sub Click(Source As Button)
Dim w As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As notesdocument
Set uidoc = w.currentdocument
Set doc = uidoc.Document
Call uidoc.Save() '<----------
Call doc.ReplaceItemValue("aaa", "bbb")
End Sub

2) Call NotesUIDocument.refresh(false) before using doc.replaceItemValue in action of the embedded view

Sub Click(Source As Button)
Dim w As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As notesdocument
Set uidoc = w.currentdocument
Set doc = uidoc.Document
Call uidoc.Refresh(false/true) '<----------
Call doc.ReplaceItemValue("aaa", "bbb")
End Sub

The first option can be unacceptable by application logic because users lose the ability to quit from a document without saving it.

The second option will not work if you use the property "Show single category" for embedded view - NotesUiDocument.refresh(false/true) will end with Notes crash.

This bug is reproducible for Notes 8.5x, 9x and 11x.

Wednesday, January 17, 2018

xsp.domino.view.navigator=ByNoteId - does not work if data source is located on another Domino server

Hi

You might know that categorized Xpages views built (for example) via <xp:viewPanel> by default work slower than they actually could. IBM worked on this problem in past and since Domino R9.0.1 you could add a following line


xsp.domino.view.navigator=ByNoteId

into Xsp.properties of your application and performance of categorized views would become much nicer.

This workaround always worked OK for me but it seems it does not work in case if your data source (f.x. back-end view) is on another server (tested with 9.0.1 FP9 HF139)

Here is a screen shot of a view before I click on any category

 Here is a screen shot after I clicked on category "Event"



It works OK if data-source is in the same database or in another database on the same server.

Wednesday, January 28, 2015

A bug? Attachments in a 2nd nested subform are always displayed at bottom additionally.

Hi

You may know that computed subforms can be helpful if you need to hide/show richtext field.
You can create a subform, put there richtext field and then insert computed subform on a main form with required formula. I used this approach many times and it always worked perfectly.

However today I discovered that this approach does not work if you richtext is located in a nested subform that is inserted in another subform that is eventually used on a main form. In this case all attachments are displayed additionally at the bottom under horizontal line like there is not associated richtext field on Notes form at all.

Form<-Computed subform: it works



Form<-Computed subform <-Computed subform (richtext is here): all attachments are displayed twice.


Btw, it does not matter if it is a computed subform or explicitly inserted subform - it works the same buggy for attachments in a second nested subform.

Crap :-) Now I have to switch to solution with a collapsible section or layer.

Release 9.0.1FP2 SHF63

Sunday, November 2, 2014

No such session or session has been closed


Hi

I have a Notes database located on server.
When I am trying to create an agent using menu option "Create\Agent" I receive the error "No such session or session has been closed". However I still can create an agent using Domino designer.

Very odd issue.
The interesting thing is that I can create agents using menu option "Create\Agent" for any other Notes databases on the same server. I have never had such issues before.

Do you know what is it?

IBM Notes 9.0.1 
Revision 20131022.1138 (Release 9.0.1) 
Standard Configuration








Monday, August 25, 2014

A bug in NotesDatabase.Search() ?

Hi

I think I have found a bug in NotesDatabase.Search() function.
Or it is a bug in a While statement, not sure.

Let me explain.

If you define 3rd parameter in NotesDatabase.Search() to set a number of documents you want returned and then try to enumerate documents in block While you will see that code will pass through ALL documents  no matter how many documents are in collection.
NotesDatabase.FTSearch() instead works OK.

See example below.

Thursday, January 23, 2014

An issue with Script Debugger - cannot use it for debugging one of my NotesAgents

Hi guys

Today I have experienced a very strange issue with debugger when I tried to debug one of my Notes Agents. The issue is that when script debugger window pops up I can do nothing with it.
Look on my screen:

I have tried to resave the agent and Script Libraries it used but it didn't help.
I do not want to recompile all lotusscripts because I do not want to override signatures of other developers.

Do you have an idea?

Notes 9.0.1


Thursday, January 16, 2014

"File does not exist" on replication

Hi

By some reason I cannot run server-local replication for one of my Notes databases.
I receive an error with description "File does not exist".
Check my screens below:







I tried to remove both database shortcuts (local and server) from the Lotus Notes workspace, then pull them there back via "Open File" dialog but it didn't help - the issue was still here.

The only one idea I currently have is that probably it is related to dir-file that I use for folder mapping.However I have many databases inside of mapped folder and rest of them replicate without any issue.

If you know how to fix it, please let me know.

Release 9.0.1
Revision 20131022.1138 (Release 9.0.1)
Standard Configuration

RESOLVED!

Sunday, January 5, 2014

Do not use two or more lotusscript expressions in one line via ":" symbol because you will not be able to use Script Debugger properly

Hello

As you know IBM Lotus Domino Designer allows to use two or even more lotusscript expressions in one line concatenated by ":" symbol.

Something like
......
Print 1 : Print 2
......

However I do not suggest you to do it like that.
You will reap headache when you need to debug lotusscript code that contains such constructions.

The problem is that Script Debbuger automatically divides expressions to separate lines and you will get a mess, see below.

Sunday, September 1, 2013

On save issue with a date field with a "Calenar/Time control" style enabled

Hello

Guys, did you notice that sometimes when you press Ctrl+S after changing a value in a Date field with "Calendar/Time control" style enabled its old value is restored back?

Here is a list of steps to reproduce:

1) Create a Date field on a form with mentioned style enabled. Put @Today as a default value for this field.


Thursday, July 4, 2013

CWPST007IE: The maximum number of login attempts has been exceeded.

Hello

After I began to use IBM Notes 9 I get following error from time to time when I try to open Domino Designer after a few switching between different ids:

When I click "OK" IBM Notes closes itself without any question.

I Googled it a little and found that IBM accepted this bug into the list of things which should be fixed in a future releases. 

As a local fix IBM suggests to remove folder "workspace" :-) 

I have a feeling that I saw the same suggestion regarding other completely different issues with IBM Notes so it seems reasonable to put removal of this folder into Windows startup :-) haha


Wednesday, July 3, 2013

IBM Notes 9 may corrupt local names.nsf on crash

Hello guys

Today I experienced this problem 5th time so it is obvious a bug in IBM Notes 9.
The problem is that when your IBM Notes crashes it may happen that your names.nsf will be corrupted and all location documents are dead. Today I got this issue again - in general it is a 5th time since I started to use IBM Notes 9: twice with IBM Notes 9 beta and 3 times with public release 9,

How it looks:

1) My IBM Notes 9 crashed.

Sunday, May 5, 2013

IBM Java in Notes 9 - still version 6

Hi guys

Currently I stuck with a zipping of files with non-ASCII characters in their names.
Actually, I have a few ideas how to move ahead and resolve it but I want to wait a little because my ideas require more efforts than I expected initially.

My current solutions is next (you can download working example on the bottom of this page):

  • I have a Java library that uses standard capabilities of java.util.zip.ZipEntry and java.util.zip.ZipOutputStream. 
  • I use LS2J technology so I have a lotus script class that invokes public method from Java-class that does actual zipping.

Solution is simple and works perfect until we do not have files with non-ASCII characters in their names.

Monday, April 22, 2013

@Modified > NotesDocument.LastModified

Hello guys

Did you know that NotesDocument.LastModified and @Modified may give you different results for the same document? Craziness, isn't it? :-) . Unfortunately, this is a true.


This can be a critically important thing if you work on replication issues.
At least it was in my case.
I developed application that allowed to see differences between replicas of the same database on the different servers and initially I could not understand why I always got different modification time for the same document across all replicas when I used NotesDocument.LastModified.

I am not sure if it works the same in all Domino/Notes releases but I see it on Domino 8.5.3 FP2

I found a post on IBM about this bug.


Wednesday, February 27, 2013

IBM Lotus Domino 8.5.3 FP3 does not work correctly with IBM Lotus Traveler

Hello

Recently I got a task to install IBM Lotus Traveler Upgrade Pack 2 to enable ToDo's synchronization.
Since our IBM Domino server that we used for Traveler was R8.5.2 I decided to upgrade it also to be sure that we have a latest Domino with Traveler configuration.

So, I did two upgrades at once. Stupid me.

In the morning of the next day (I did all upgrades in the evening of the previous day) I became to get complaints from users that sometimes (not always) if you replay on email from IBM Lotus Traveler it got to a recipient with a broken text in the Body. I was quite surprised because all these encoding related things always worked good enough in IBM Lotus products but when I checked it myself I got confirmation that replays from IBM Traveler had issues with a content of Body. The problem, actually, was only with characters from Cyrillic alphabet.


Thursday, January 17, 2013

LS2J in Notes Form: cache or bug?

Hi guys

Do you know something about caching issues in LS2J technology?
I discovered a strange thing about it. Let me show you.
I work in IBM Notes 9 beta.

I have a database with Java library that contains a simple class with a single method

public class myTestClass {
public void someMethod() {
System.out.println("Test LS2J: 111");
}
}

I am going to use this Java class in a Notes Form and then in a Notes Agent.
Lotus script code is the same for both cases:

Option Declare
Uselsx "*javacon"
Use "TestJavaLib"

Dim js As New JavaSession
Dim myClass As JavaClass
Dim myObject As JavaObject

Set myClass = js.GetClass("myTestClass")
Set myObject = myClass.CreateObject

Call myObject.someMethod()

Let's test it for both form and agent:

Monday, January 14, 2013

CreateObject() with NotesAgent.RunOnServer()

Hi

This is a known issue but if you get it the first time it may confuse you.

Lotus script function CreateObject() does not work in NotesAgent if it was called using method RunOnServer. Of course database with the agent should be located on the server.

To see it yourself you can do next:

Friday, January 11, 2013

Show Java Debug Console

Hi guys

Did you notice that sometimes top menu option "Tools\Show Java Debug Console" does not work? I mean you click on it but java console window does not appear - just nothing happens.

I know only one way how to get it for sure (suggested by my bro):
  • Completely close Lotus Notes
  • Launch Domino Designer
  • Click on "Tools\Show Java Debug Console" to get java debug console window (with only Domino Designer launched it works always)
  • Launch Lotus Notes
I am completely sure I am not a fan of this way :-)

Do you know how to do it easier?


How to refresh NotesUIDocument from categorized embedded view

Hi guys

You may know that there is one limitation (bug, feature, I do not know how to call it properly) regarding calling of NotesUIDocument.Refresh() method from the action of embedded notes view with enabled single category.

If you do that you always get a crash of Lotus Notes.

I know that this limitation exists from Notes R5 and higher and it is still here, even with release 9.

Check my screens below