Multiple Custom Edit Forms + Data View Caching + Unexpected Error = Bug? RRS feed

  • General discussion

  • I have multiple custom edit forms for a custom list in SharePoint 2007 and SharePoint seems to have an issue where it serves up incorrect id's for the toolbar on my forms causing an unexpected error.  I know the toolbar id's are incorrect because if I refresh the form and compare the source pre and post-refresh, the id's change and the form can be submitted without the unexpected error.   I submitted a question (and answered it myself) with more details about this in a previous post which can be viewed here:


    What I hope to get from this discussion is a more clear understanding on how Data View Caching works as turning this off solved my issue.  However, I don't know what are the implications of doing so.  I concluded, from my own issue, that because I have more than one custom edit form sourced from EditForm.aspx and, with data view caching turned on, it would seem that SharePoint is getting confused and serving up cached parts of one edit form and combining it with a separately named edit form.  So, when the custom form is submitted, the mismatched control id's (as described in the link above) are causing the "Unexpected Error."  I know this to be true because, after exhaustive testing, the form always fails with the unexpected error when the control id's are mismatched and, my theory is that that the only way they could be mismatched is if there's a bug somewhere in SharePoint's caching mechanism with regard to what edit for is being served up for display.  To further illustrate that this is the case, if I refresh the form (F5) in the browser before making any edits, the id's are never mismatched and the form always submits successfully, I assume, because SharePoint does not serve up cached parts upon refresh.

    Therefore, with data view caching turned off, I don't appear to get any cached parts nor do I get mismatched control id's and, most importantly, no unexpected errors.  Can someone help me understand the design here?  Is this by design?  A bug?  A "never thought anybody would do this" type of thing?  

    One last edit...the reason I have multiple edit forms, I don't have a reliable test environment and one form is for production entry, one is in development for changes, and one is a no-code edit form with all fields so I can make a quick edit to a list item without interrupting any workflow.
    • Edited by cygnus0101 Monday, April 30, 2012 5:16 PM Addtional Info
    Monday, April 30, 2012 3:55 PM