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

cfimage writeToBrowser does not work

Community Beginner ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Hello,

running:

Coldfusion 2016

Centos Linux 7

program:

<cfimage action="writeToBrowser" source="test.png" format="png" />

displays nothing.

Tag worked in previous version

Brian Erickson

Views

855

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 ,
Nov 02, 2017 Nov 02, 2017

Copy link to clipboard

Copied

Brian, before concluding this must be some bug in CF (whether unique to your specific image or not), I have some suggestions.

  • Are you saying this really stands alone in a page doing nothing else? If not, try that.
  • And as a sanity check, if you replace the tag with some other tag generating output, like a cfdump of the server scope, does that appear?
  • As yet another sanity check, can you put the file in its own folder, and add a blank application.cfc? That will stop it running any application.cfc or cfm that your code is currently running. Your "blank page" could be influenced by that.
  • if you change the action to "info", and remove the format attribute,and add a structname="myimage", then do a cfdump of myimage, what do you see?

/Charlie (troubleshooter, carehart.org)

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 ,
Nov 03, 2017 Nov 03, 2017

Copy link to clipboard

Copied

Hi, Charlie, long time no type.    Good to see you, again.

Another possibility could be folder permissions.  We lock down the temp folder that cfimage uses for writeToBrowser, so we can't use it.  Maybe the folder permissions changed during the upgrade process.

V/r,

^ _ ^

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 ,
Nov 03, 2017 Nov 03, 2017

Copy link to clipboard

Copied

Hi, sir. Yep, I've been far more active in the CF Admin forum, but as I see most questions here these days are as much about setup or troubleshooting, I figured I'd jump in and start helping here as well.

So when you say "we", do you mean to imply that you work with Brian? Or did you just mean that as another possibility for him to consider?

I will say that one of the reasons I proposed he run the request in a page doing that alone and with a blank application.cfc was that if there was an error, he should see it (whereas some app-level error handler may have been intercepting his request).

Of course, there could still be a server-level error handler (in the CF Admin Settings page, for the "site-wide error handler"), and in that case, Brian, if you still see a blank page and don't see any error, check your CF application.log to see if there is any error there. If you have the Adobe-provided sitewide error handler (the one implemented if one enables the "Secure profile", that will still write an error to the application.log. If you find some custom site-wide error handler, those usually do NOT write the error to the log, though they should (with cflog).


/Charlie (troubleshooter, carehart.org)

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 ,
Nov 03, 2017 Nov 03, 2017

Copy link to clipboard

Copied

charlie@carehart.org  wrote

So when you say "we", do you mean to imply that you work with Brian? Or did you just mean that as another possibility for him to consider?

I do not work with Brian, I used my work environment configuration as a possible alternative reason as to why writeToBrowser isn't working in the current version as opposed to the last version. 

Brian could also use the inidividual application.cfc to cfmail a cfdump of the error, or use cftry/cfcatch to display a cfdump of the cfcatch message on screen, if so triggered.

V/r,

^ _ ^

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 ,
Nov 03, 2017 Nov 03, 2017

Copy link to clipboard

Copied

LATEST

Thanks for the clarification. Was just curious. And yes, indeed he could. 🙂


/Charlie (troubleshooter, carehart.org)

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