Skip to main content
USA Jon
Participant
August 28, 2008
Question

CFLOCATION not rendering page

  • August 28, 2008
  • 4 replies
  • 1132 views
Using a CFLOCATION tag does not always render the page I want to go to, it renders a blank page. The URL is correct and if I do a refresh, the page comes up just fine. If I have debug on, I see the previous pages info with the correct URL.

I put this at the bottom of a save.cfm page -- cflocation url="index.cfm" --
Sometimes after the save.cfm runs, the rendered page to the user is blank or if I have debug on, it is the save.cfm debug info, but the address in the browser is index.cfm. Hitting refresh brings up index.cfm

any ideas - I am running CF 7.0.2 on win2003

thanks
J.
This topic has been closed for replies.

4 replies

BKBK
Community Expert
Community Expert
August 29, 2008
Do you get the same problem when you run this new page?

save2.cfm
==========

<cflocation url="index.cfm">

Inspiring
August 28, 2008
Adam Cameron wrote:
>
> This is usually what the problem is.
>

This just popped into my head, I don't know how likely it would be or if
it would apply to the behavior described.

But could other redirects cause a 'too many redirect' error in the browser?
Inspiring
August 28, 2008
<cflocation> works by sending an HTTP "relocation" response to the browser.
Read up here: http://livedocs.adobe.com/coldfusion/8/Tags_j-l_04.html.

The code needs to be in the HTTP header. If you have flushed any data to
the browser already (eg: <cflush>), then a status code of 200 will have
already been sent to the browser, so it's "too late" for the <cflocation>
to send it's code.

This is usually what the problem is.

--
Adam
Inspiring
August 28, 2008
hi,
The problem should be related to "index.cfm", not "save.cfm".
cflocation actually sends a response to the browser to go to the other page instead (redirect)
verify what happens when you go directly to index.cfm, and what could cause that page to show an empty screen.

cheers,
fober