CFDUMP and CSS

Do you ever use cfdump and notice that the layout doesn’t come out right? This is due to a fairly simple issue. Whenever you use cfdump, it checks to see if it has been used already in the current request. If it has not, then it outputs CSS. This helps cut down on your download time. However, it means that if the first cfdump is suppressed in some way, your second cfdump will not look right. This can happen if you cfmail your cfdump. Here is a simple example showing this behaviour (Pre-CFMX7):

<cfsavecontent variable="foo">
    <cfdump var="#server#" />
</cfsavecontent>

<cfdump var="#request#" />

Luckily there is a simple way around it - turn off the request variable cfdump checks for:

<cfsavecontent variable="foo">
    <cfdump var="#server#" />
</cfsavecontent>

<cfset request.cfdumpinited=false />
<cfdump var="#request#" />

source


Possibly related:


Tagged , | Post a Comment