Hi,
I did post this to stackoverflow a month or so ago (http://stackoverflow.com/questions/19416810/cflocation-no-longer-working-in-cf10) but didn’t end up with any follow up answers after working out the real source of the problem. Hoping someone on here has some ideas.
I have a multi-step process that runs overnight. The process is made up of about 10 files that chain together using cflocation (only follows cflocation if no errors were detected). This was working fine until I moved from CF9 to CF10. Code works fine until it hits cflocation tag. Has anyone seen an issue with cflocation not working in CF10 vs. CF9?
I’ve been able to reproduce this problem with 2 files:
<h1>Testing cflocation</h1>
<cfloop index="i" from="1" to="7000" ><!--- For me it stops working once the loop goes beyond 6808 rows --->
row <cfoutput>#i#</cfoutput>: abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789<br/>
</cfloop>
<p>Now loading resultpage via cflocation</p>
<cflocation url="resultpage.cfm" addtoken="false">
<h1>Made it!</h1>
<p>Reload the <a href="index.cfm">first page</a></p>
In my testing I found that if I looped 6808 times it works but 6809 times fails. With 7000 records we are only talking about a 36 KB file….any clues why this is failing only in CF10?
Cheers
Mark
--
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+u...@googlegroups.com.
To post to this group, send email to cfau...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/groups/opt_out.
Im assuming this is a scheduled task,
Your page is timing out and never gets to the cflocation
Try adding a cfsetting to increase the timeout.
Regards
Dale Fraser
--
Hmm strange,
Id suggest the redirect isn’t being generated, here is a work around
<h1>Testing cflocation</h1>
<cfloop index="i" from="1" to="7000" ><!--- For me it stops working once the loop goes beyond 6808 rows --->
row <cfoutput>#i#</cfoutput>: abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789<br/>
</cfloop>
<p>Now loading resultpage via cflocation</p>
<script language="javascript">
window.location.href="/newpage";
</script>
Regards
Dale Fraser
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Mark Picker
Sent: Wednesday, 20 November 2013 6:08 PM
To: cfau...@googlegroups.com
Subject: [cfaussie] cflocation fails in CF10 but fine in CF9
Hi,
--
Ok I worked it out
In CF Administrator
Maximum Output Buffer size 1024
After which a flush will occur which will stop cflocation working.
Increase it and it works.
I’m happy to post this to stackoverflow if it works for you.
Regards
Dale Fraser
--
Its not a bug, its doing what it is supposed to do based on that setting.
Regards
Dale Fraser
From: cfau...@googlegroups.com [mailto:cfau...@googlegroups.com] On Behalf Of Zac Spitzer
Sent: Thursday, 21 November 2013 3:55 PM
To: CFAussie
There is no error, because a cfflush will cause the cflocation header to be reset thus it just never happens.
The setting is new in cf10, and while different, not a bug.
Regards
Dale Fraser
No,
It’s the same as this, no error, nothing happens. The flush kills the location
<cfflush />
<cflocation url="page2.cfm" addtoken="false">
Previously the output never happened and the location did
Now due to the flush
The content is happening and not the location
You are correct its one or the other.
Regards
Dale Fraser
--