Copy link to clipboard
Copied
Has anyone experience the problem similar to below.
<cfquery name="getSomething" datasource="ds">
SELECT 'test' test1
FROM DUAL
</cfquery>
<cfoutput>
aaa#getSomething.test1#aa
</cfoutput>
result is:
aaatest aa
Notices the whitespace which is variable. The problem only occurred at one of our client machine which we don't have any controlled of.
I even surround it with csilent but nothing fix. I can trim as a temporary solution but need to find the cause so it could be prevented in the future. What puzzle me is it working fine at our dev and quality environment but not at our client environment.
Copy link to clipboard
Copied
Are you using <cfprocessingdirective suppressWhiteSpace="yes"> already?
Copy link to clipboard
Copied
Did set the Enable Whitespace Management, shouldn't that supercede the <cfprocessingdirective suppressWhiteSpace="yes">..?
Copy link to clipboard
Copied
I can't recall offhand, but I checked my dev CF8 server's settings, and find whitespace management is enabled. Still, I use <cfprocessingdirective suppressWhiteSpace="yes"> in my templates invoked via AJAX, because if I recall there still was extraneous whitespace. No harm in trying.
Copy link to clipboard
Copied
I have no problem trying, it is just that I don't have the leverage to tell the client try this and that. Can't really test on our environment since it is working fine. I just don't get how a SELECT statement would generate random amount of whitespace.
I guess I should quitely try <cfprocessingdirective suppressWhiteSpace="yes"> in the future. For now, a bunch of wastefull TRIM...
Thanks.
Copy link to clipboard
Copied
As well as the cfadmin white space management setting, the <cfprocessingDirective...> tag and the <cfsilent...> block, don't forget there is also the <cfsetting enableCFOutputOnly="true"> that can be used to control whitespace.
With this option only content inside of <cfoutput>...<cfoutput> block get rendered to the client response.