Random Error Msg "Field length stored in document is incorrect"

FYI: V11 Domino Client

I did the following designer update:

  • I made a copy of an existing subform (Copy 1) and applied some changes.
  • Once finished with my updates to "Copy 1", I renamed the original subform (Original 1) to "Original 1 Backup".
  • Renamed "Copy 1" to "Original 1".
  • Opened the form that contains that subform (Original 1) and removed the current subform and inserted the new "Original 1" subform.

I now randomly receive "Field length stored in document is incorrect" error message.

I have no clue why I am receiving this error message.

Any help would be greatly appreciated.

I will test some more however I think I may have found something.

The subform contained a button (Lotusscript) that updates a field located on the form, not the subform. This field used to be located on the sunform.

Can issues occur when you attempt to update a field from the subform that is located on a form?

Hi Michael,

You have mentioned that -->
I now randomly receive "Field length stored in document is incorrect" error message.

1)Confirm the reproducible steps like on what action you get this error. Are you trying to save document from UI and then you get this error etc.

2)It seems that issue is intermittent. So, is it like on similar actions, sometimes error appear and sometimes not?.

3)Regarding the second update of yours having button on Subform, is the error appearing on click of this button.

Regards,

Amit Sharma

I have seen strange remnants in design documents that have had a long and fruitful life. One strategy for cleaning that up is using a tool like Ytria ScanEZ (awesome tool, alas at an equally awesome pricepoint) or Domino Navigator (free, but German only ui...) to try and find design elements which should have been removed in edits.

Ofcourse, make sure you have a working backup before attempting these edits.

The technique I use involves looking up the Note ID, and using Domino navigator to open the corresponding document using that Note ID.

Examples of things to remove are Fields that are not actually in the Form. Or fields holding compiled code for actions which are no longer there. In views, make sure to use a Designer v 9 or later and edit one of the sorting options to get rid of the sorting options that were left in there by old Designer (I think somewhere aroun v6 or v7 had that bug) which caused views to require extar updating and using space while having no user benefit. While you are at it: remove unneeded views and sorting options. Great way to speed up applications and Domino.

Looking for which views eats up space: Open Domino Administrator, go to Files tab, right click on db and select manage views. Sort by size to find the offenders. Note that this only finds big views if they are built. Sanitizing views if you are looking at them anyway is a best practice I have learned from developing Notes apps for decades...

From rereading your post, I suspect this is indeed an application with a long history. I think it would be a good plan to:

Clean up subforms (make sure that after editing, you open each subform in Designer and resave them so any accidentally deleted compiled objects which should be there are recompiled).

Then clean up the forms, and remove and read the cleaned up subforms.

If the problems persist, I would look at the code. Some overly complex dynamic stuff? Sometimes, I have just taken a good look at a Form and just rebuilt it from scratch. If you do that, make sure to avoid copying anything from an old form. It can be very surprising what is carried within a innocuous looking piece of rich text.

Oh and while mentioning rich text: sometimes the nasty stuff lives in zero width rich text leftovers. To find those, use the Objects tab in the Programmers pane. Right click and Expand All. Then scroll through the list and make sure every bit of code in that list has a reason to exist.

Please report back if you make progress! A lot of stuff I have learnt over the years is because of reading posts like these and learning from the advice and what works.

Amit,

The error would occur when I attempted to save the document via a Form action. The save was Formula Language. Definitely reproducable.

Lars,

The following appears to have resolved the issue.

"Clean up subforms (make sure that after editing, you open each subform in Designer and resave them so any accidentally deleted compiled objects which should be there are recompiled).

Then clean up the forms, and remove and read the cleaned up subforms."

What caused the error:

  • Form has an inserted subform.
  • Removed field from the subform, saved subform
  • Added field to Form, saved Form
  • Started randomly, to more frequently receiving the error.
  • Removed field from Form, saved Form
  • Added field to the subform, saved subform.
  • No longer received the error

Alternative way to move this field.

  • Removed field from the subform, saved subform
  • Added field and removed inserted subform on the Form, saved Form
  • Reinserted the subform, saved the form
  • So far, no error

Looks like moving a field from a subform to a form that contains that subform causes issues. All is working now.

Thank You both for the responses.