• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFLOCATION not rendering page

Community Beginner ,
Aug 28, 2008 Aug 28, 2008

Copy link to clipboard

Copied

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.
TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 28, 2008 Aug 28, 2008

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2008 Aug 28, 2008

Copy link to clipboard

Copied

<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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2008 Aug 28, 2008

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2008 Aug 28, 2008

Copy link to clipboard

Copied

LATEST
Do you get the same problem when you run this new page?

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

<cflocation url="index.cfm">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation