Notes/Domino Fix List
| |
SPR # TKIE5LQ8G2 | Fixed in 6.5.6; 7.0.2 release | Regression in 6.0.1 |
Product Area: Client Technical Area: Client UI Platform: Cross Platform
Lotus Customer Support APAR: LO11987
SPR# TKIE5LQ8G2 - With this fix, a flag is set to "prohibit the design refresh or replace to modify" on a newly created image resource, so that the upgrade will not remove the image. This regression was introduced in 6.0.1.
Technote Number: 1116386
Problem:
This issue was reported to Quality Engineering as SPR# TKIE5LQ8G2, and is fixed
in Notes 7.0.2 and Notes 6.5.6.
Excerpt from the Lotus Noes and Lotus Domino Release 7.0.2 and 6.5.6 MR fix
lists (available at http://www.ibm.com/developerworks/lotus):
Client UI
SPR# TKIE5LQ8G2 - With this fix, a flag is set to "prohibit the design refresh
or replace to modify" on a newly created image resource, so that the upgrade
will not remove the image. This regression was introduced in 6.0.1.
Refer to the Upgrade Central site for details on upgrading Notes/Domino.
Background on issue:
When an upgrade occurs, the Notes Client checks the Notes.ini parameter,
"templatesetup=" to determine if the design of certain databases such as the
Bookmark database (Bookmark.nsf) and Personal Address Book database (Names.nsf)
need to be updated. Outlines and images associated with the Toolbar buttons
do not have the property, "Prohibit Design Refresh or Replace to Modify"
selected due to the upgrade from 5.x to 6.x. As a result the outlines and
images are removed from the Bookmark.nsf. A workaround to prevent this from
happening is provided below.
This issue can also occur with inserted image resources used for Toolbars
buttons added in the 6.0.1 Bookmark database. To prevent these images from
being removed by the upgrade, open the Bookmark database in Domino Designer and
navigate to Shared Resources, Images. Highlight the image, right-click and
open the resource properties. On the Design tab, enable the property "Prohibit
Design Refresh or Replace To Modify" by selecting its checkbox.
SmartIcons used by the Notes 5.x Client are added automatically to the Bookmark
database when an upgrade of the Notes Client to the 6.x codestream occurs. To
access these icons go to File > Preferences > Toolbar Preferences and select
Customize. If the icons are not available then it may be necessary to import
the SmartIcons via File > Preferences > Toolbar Preferences > Toolbars > Import
> select the W32 directory below the Notes \Data directory. Refer to the
following document for additional information "SmartIcon/Toolbar changes are
lost when upgrading Notes Client to a new release" (# 1096627).
A new 6.x Bookmark database will not exhibit this issue because it has the
property "Prohibit Design Refresh or Replace to Modify" enabled for the
outlines.
Workaround:
1. Open the Bookmark.nsf in Domino Designer and set the "Prohibit Design
Refresh or Replace To Modify" property on the Outlines: UserToolbar,
UserToolbarManager, and UserToolbarPOD.
Note: Any images in shared resources associated with the toolbars should also
have the "Prohibit Design Refresh or Replace to Modify" option set before
upgrading the client.
2. Use this sample code:
IMPORTANT NOTE: The below is a sample script, provided only to illustrate one
way to approach this issue. Notes Support will not be able to customize this
script for a customer's own configuration. While this may work for some
customers it is offered as a suggestion only, and is not something that Lotus
Software supports further.
Create a memo and create a button in it and choose LotusScript. In the
Declarations variable place the following:
Declarations:
Declare Function NSFDbOpen Lib "nnotes.dll" (Byval filename As String, hDB As
Long) As Integer
Declare Function NSFDbClose Lib "nnotes.dll" (Byval hDB As Long) As Integer
Declare Function NIFFindDesignNoteExt Lib "nnotes.dll" (Byval hDB As Long,
Byval SearchValue As String, Byval NClass As Long, Byval bla As String , NoteID
As Long, Byval flags As Long) As Integer
Declare Function NSFNoteOpen Lib "nnotes.dll" (Byval hDB As Long, Byval NoteID
As Long, Byval flags As Long, hNote As Long) As Integer
Declare Function NSFNoteClose Lib "nnotes.dll" (Byval hNote As Long) As Integer
Declare Function NSFItemSetText Lib "nnotes.dll" (Byval hNote As Long,
Byval FieldName As String, Byval NewValue As String, Byval lenth As Long) As
Integer
Declare Function NSFNoteUpdate Lib "nnotes.dll" (Byval hNote As Long, Byval
flag As Long) As Integer
Initialize Event:
In the Initialize event place the following:
%REM
This agent enables the property "Prohibit design refresh or replace to modify"
for all image resources in the current database. This property is set by
appending "P" to the $Flags item of the image resource.
IMPORTANT NOTE: Before running this script make a backup
of any/all databases that will be processed by it.
%END REM
Dim s As New notessession
Dim db As New notesdatabase("","Bookmark.nsf")
Dim nc As NotesNoteCollection
Dim note As notesdocument
Dim noteID As String
Set nc = db.CreateNoteCollection(False)
nc.SelectImageResources = True
Call nc.BuildCollection
noteID = nc.GetFirstNoteId
For i = 1 To nc.Count
Set note = db.getdocumentbyID( noteID )
'only process img reources lacking the protect bit.
If Instr( 1, note.~$Flags(0), "P", 5) < 1 Then
note.~$Flags = note.~$Flags(0) & "P"
Call note.save( False, False )
ModCount% = ModCount% + 1
End If
noteID = nc.GetNextNoteId( noteID )
Next
Msgbox "Modified: " & Cstr( ModCount% ) & " Image Resources in: " &
db.FilePath
End Sub
Click Event:
In the Click event add the following:
Sub Click(Source As Button)
Dim hDB As Long
Dim erro As Integer
Dim dbName As String
Dim NoteID As Long
Dim s1 As String
Dim NClass As Long
Dim flags As Long
Dim hNote As Long
Dim NewValue As String
Dim FieldName As String
Dim Length As Long
Dim i As Integer
NewValue = "m34P"
FieldName = "$Flags"
Length = Len(NewValue)
Dim mysearch(3) As String
mysearch(1) = "UserToolbar"
mysearch(2) = "UserToolbarManager"
mysearch(3) = "UserToolbarPOD"
flags =0
s1 = "+m"
NClass = 32767
DbName = "bookmark.nsf"
erro = NSFDbOpen (dbName, hDB&)
If erro = 0 Then
For i=1 To 3
erro = NIFFindDesignNoteExt (hDB, mysearch(i), NClass,s1 ,NoteID,flags)
If NoteID > 0 Then
erro = NSFNoteOpen(hDb, NoteID, flags, hNote)
If erro = 0 Then
erro = NSFItemSetText(hNote, FieldName, NewValue, Length)
If erro = 0 Then
flags = 1 ''force update
erro = NSFNoteUpdate(hNote, flags)
End If
erro = NSFNoteClose(hNote)
End If
End If
Next
End If
Call NSFDbClose (hDb)
End Sub
More >
Last Modified on 12/11/2013
Go back
|