Subject: In 8.5.2 this seems to be causing design element corruption
I ran across this little ‘feature’ today. I created a new role in my template and tried to restrict the agent access to the new role when I got the error message, presumably because I didn’t have the role myself. This caused the agent to disappear from the design element list. I assumed it had deleted itself so I recreated it, but got the same problem and the agent disappeared again. Not only that, but an agent I hadn’t even been editing also disappeared. When I refreshed the design of the live database from the template, I found that there were several copies of the agent now in the live database.
I used NotesPeek to see what was going on in the template and sure enough, there were several copies of the agent in there which I couldn’t see using Designer. I tried using GetDocumentByID with the note IDs that NotesPeek showed me to get a handle on the rogue agents to delete but it couldn’t get a handle on the notes that way. I also tried using a NotesNoteCollection and although it found the agent notes, using GetDocumentByID with the note id from the collection wouldn’t return a note object for me to remove.
I tried using fixup and compact but this didn’t make a difference. In the end, I found that either creating a copy of the database gave me a version without the corrupted agent notes, or overwriting my replica of the template with one from elsewhere also worked. Unfortunately I was never able to get the original agent back, but luckily in my case it was only a couple of lines of code referring to a function in a ScriptLibrary so not much was lost. I could have been in a very bad way if all of my code had been in the agent rather than the script library.
I tested this in a separate database using the following steps:
-
Create a new role in the ACL
-
Create a new agent.
-
Give the agent a name and save it
-
Confirm the agent is in the design list
-
Go to the agent Security properties, uncheck ‘All readers and above’ for ‘Default access for viewing and running this agent’ and check the role created in step 1
-
Click save
-
Enjoy the exciting error message which appears
-
Close your agent and confirm that it is now missing from the agent list
-
Use NotesPeek to see that the agent does exist but is invisible in Designer
IBM have technote about this (https://www-304.ibm.com/support/docview.wss?uid=swg21431216) but it doesn’t apply to 8.5.2 and claims only to be an unhelpful error message, it doesn’t mention the corruption problems. I’ve submitted feedback on the technote but have no other way of reporting how the bug differs in 8.5.2
For reference, the full text of the error message is:
Save could not be completed.
Reason:
A zero note ID would have been passed into IPC_ACTION_STATE_SAVE_CONTENTS in LSEDTIPC.DLL. Agent script content save aborted
Emily
EDIT: I can confirm that if you already have the role BEFORE you open the database for editing, you don’t get the error message, the agent saves successfully and nothing gets corrupted