Title:
Bug 82910:Bug: CFGrid link to CFDocument doesn't work in CF9 with IE7 and no-cache header
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Bob Keleher / Bob Keleher (bobk1)
Created: 05/17/2010
Components: Document Management, PDF generation
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 /
Priority/Frequency: Trivial / Most users will encounter
Locale/System: English / Win All
Vote Count: 0
Problem:
Bug: CFGrid link to CFDocument doesn't work in CF9 with IE7 and no-cache header.
We have a hyperlink from a CFGrid applet to a page that generates a PDF using cfdocument. This works fine in CF7 but in CF9 the link doesn't work - there are no error messages, the page just doesn't change. After some investigation we found that the conditions that create this are as follows:Using ColdFusion 9 (CF8 not tested)Using IE 7 browser (other IE versions not tested, but Firefox and Google Chrome work properly)Using CFGrid Applet format to link to the action page (href etc.)Using CFDocument on the action page.*Using <CFHEADER NAME="Cache-Control" VALUE="no-cache"> on the action page* Note that using "flashPaper" format instead of "pdf" for cfdocument creates a different problem: a dialog box opens asking you to open or save the document and when you select open nothing happens.Possible Workarounds considered1. Stop using no-cache header We can't do that, our security policies won't allow sensitive data to be cached on PC's2. Use "html" format for CFGridTried that, and while it solves the problem, it visually messes up the rest of the search page, e.g table margins are lost, centering no longer works3. Use "flash" format for CFGridThat doesn't support hyperlinking4. Use an intermediate page with javascript to go to action page, e.g.<CFHEADER NAME="Cache-Control" VALUE="no-cache"><cfif isDefined("url.pass2")> <cfif isdefined("url.CFGRIDKEY")> <cfif url.CFGRIDKEY is "Link to pdf document"> <cfdocument format="flashpaper" > PDF Test succeeded </cfdocument> <cfelse> HTML Test succeeded </cfif> </cfif><cfelse> <cfoutput> <script type="text/javascript"> document.location.replace ("cfgridaction.cfm?CFGRIDKEY=#url.CFGRIDKEY#&pass2"); </script> </cfoutput></cfif>That works as far as solving the original problem, but now the BACK button no longer works properly: in IE 7 location.replace doesn't replace the intermediate page in history so you keep getting returned to the action page.
Method:
Test with IE 7 Browser
CFGridTest.cfm============Both of these links work properly:<br />
<a href="cfgridaction.cfm?CFGRIDKEY=Link to pdf document">Link to pdf document</a><br />
<a href="cfgridaction.cfm?CFGRIDKEY=Link to html page">Link to html page</a><br /><br />
Only the "Link to html page" link works properly in this cfgrid applet:
<cfform>
<cfgrid NAME="testGRID" SELECTMODE="single" rowheaders="no" autowidth="yes" height="70" format="applet">
<cfgridCOLUMN Name="detail" href="cfgridaction.cfm" width="150">
<cfgridRow data="Link to pdf document">
<cfgridRow data="Link to html page">
</cfgrid>
</cfform>
CFGridAction.cfm============
<CFHEADER NAME="Cache-Control" VALUE="no-cache">
<cfif isdefined("url.CFGRIDKEY")>
<cfif url.CFGRIDKEY is "Link to pdf document">
<cfdocument format="pdf" > PDF Test succeeded </cfdocument>
<cfelse> HTML Test succeeded </cfif>
</cfif>
Result:
n/a
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3041462
External Customer Info:
External Company:
External Customer Name: Bob Keleher
External Customer Email: 426B6D3F449A836899201549
External Test Config: 05/17/2010
Attachments:
Comments: