tracker issue : CF-4204866

select a category, or use search below
(searches all categories and all time range)
Title:

CFDump Loss of Formatting

| View in Tracker

Status/Resolution/Reason: To Fix//BugVerified

Reporter/Name(from Bugbase): Paul M. / ()

Created: 07/15/2019

Components: Debugging, CFDump

Versions: 2018

Failure Type: Usability Issue

Found In Build/Fixed In Build: 2018.0.04.314546 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 1

Problem Description: 
After updating from CF11 to CF2018, CFDump does not send JS and CSS to browser when used in a Component (CFC).  This results in no formatting of the tables for structs, arrays, nor objects and makes the info very hard to read.  We like to CFDUMP the #arguments# scope, among other things, to be sure of what we're working with inside CFCs.

Steps to Reproduce:
Use a CFDUMP in a CFC script and view the results in a browser of a complex object such as a struct or array.  

Actual Result:
A plain HTML4 style table with no formatting.  A view of the source in the browser shows no CSS nor JS has been written for the table.

Expected Result:
 A nice, colored and collapsible, table giving a good visual representation of the object.  This continues to work as expected in CFM scripts.  Just not when used in CFCs. 

Any Workarounds:
Instead of writing CFDump directly to browser from the CFC, we end up emailing the CFDump to ourselves.

Attachments:

Comments:

Also see Forums post: https://forums.adobe.com/message/11162715
Comment by Paul M.
31024 | July 15, 2019 04:05:18 PM GMT
Just to be sure - In the function do you have output="yes" - If it's no, then that is probably the cause. I have voted for this too as I don't think you should need output to be yes to have proper formatting.
Comment by Martin P.
31037 | July 17, 2019 09:22:07 AM GMT
Can we please have this fixed if output="no" is set on the function in a CFC - Dumping when output="yes" has proper formatting
Vote by Martin P.
31038 | July 17, 2019 09:23:14 AM GMT
No, output doesn't matter. Options for output are: Browser (default), Console, Filename I'm talking a simply one-liner in a CFC: <cfabort var="#arguments#" abort="true"> To be clear...I get the variable dump. But it has no formatting and is hard to read, especially larger objects.
Comment by Paul M.
31044 | July 17, 2019 12:22:07 PM GMT
I have further nailed down the issue. It appears as if the formatting is lost if the CFDUMP is inside a function built with TAGS, as opposed to built with CFSCRIPT. For example, in the following CFC, calling the function 'dumpsvr' will work as expected, while 'dumpsvrTag' will have no formatting. https://cffiddle.org/app/8c8b533d-9985-40c4-8104-d675475b4afd <cfcomponent> <cfscript> function dumpsvr (){ writedump(server.os); } </cfscript> <cffunction name="dumpsvrTag" output="false"> <cfdump var="#session#"> <cfabort> </cffunction> </cfcomponent>
Comment by Paul M.
31078 | July 29, 2019 07:26:20 PM GMT
Further update.... I've found it's not necessarily the TAG that is causing the missing formatting but the CFFUNCTION attribute: output="false". If you change the output to: TRUE the formatting returns. This only started happening in CF2018. In this CFFiddle if you run the function on the CF2016 server with Output=false the formatting remains. In CF2018 the formatting is gone. https://cffiddle.org/app/8c8b533d-9985-40c4-8104-d675475b4afd I don't believe the formatting of CFDUMP should be dependent on the output setting of the function.
Comment by Paul M.
31084 | July 31, 2019 01:18:55 PM GMT
Martin P. had mentioned the problem with CFFUNCTION output setting with his vote and I missed it.
Comment by Paul M.
31085 | July 31, 2019 01:20:12 PM GMT