While uploading and linking to PDF files in RiSE with iMIS version 22.214.171.12455, I encountered an interesting bug, but I also identified a workaround. Today, I’ll share both the bug and the workaround here.
The particular page with which I was working uses the Content Collection Organizer iPart to display content from other content records within tabs. I observed that if I create a link to a PDF that has been uploaded in RiSE in the content record for one of the tab content areas, or subpages if you like, then publish the record, the website displays a generic error when I click the link to download the PDF:
An unexpected iMIS error has occurred. Please try your operation again; if you still receive an error, contact the system administrator.
That’s not very helpful, so I took a look at Event Viewer on the server and noted an HttpException with the following message:
Exception message: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Interesting. Something’s happening in the iMIS/RiSE back-end code, then, which I can’t modify.
The link apparently does not have to contain any text, however; it simply must exist. The presence of the following in the main page’s content record is sufficient:
The link is not visible to the user because there’s no text, but it is the “magic sauce” that makes the PDF links within the tab content function as expected.