Adam Cameron
Adam Cameron
Marc Funaro
09/30/2022, 5:24 PMAdam Cameron
this.bufferOutput = true
Cheers Marc!Marc Funaro
09/30/2022, 5:27 PMAdam Cameron
Marc Funaro
09/30/2022, 5:28 PMAdam Cameron
Adam Cameron
Adam Cameron
Marc Funaro
09/30/2022, 5:29 PMAdam Cameron
Marc Funaro
09/30/2022, 5:30 PMAdam Cameron
Adam Cameron
Marc Funaro
09/30/2022, 5:33 PMAdam Cameron
Adam Cameron
Marc Funaro
09/30/2022, 5:39 PMAdam Cameron
Marc Funaro
09/30/2022, 5:42 PMbdw429s
09/30/2022, 6:06 PMcfconfig_bufferTagBodyOutput=true
so all my local servers have that setting switched back on.bdw429s
09/30/2022, 6:06 PMbdw429s
09/30/2022, 6:08 PMoutput=false
. CF has always collected ALL output of UDFs regardless of their output
setting just in case you decide to dump/abort from within the UDF. IMO it never should have worked in the first place, but ACF always did it historically and it was handy.bdw429s
09/30/2022, 6:09 PMoutput=false
right out of the gate unless you flip the setting.Adam Cameron
output=true
though.Adam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:14 PMbdw429s
09/30/2022, 6:15 PMAdam Cameron
bdw429s
09/30/2022, 6:15 PMAdam Cameron
bdw429s
09/30/2022, 6:15 PMbdw429s
09/30/2022, 6:16 PMbdw429s
09/30/2022, 6:16 PMbdw429s
09/30/2022, 6:16 PMbdw429s
09/30/2022, 6:16 PMAdam Cameron
this.bufferOutput
thing work in the immediate object as well? Not just an Application.cfc setting?bdw429s
09/30/2022, 6:17 PMAdam Cameron
Unless, of course, you enable that setting and abort inside the method
bdw429s
09/30/2022, 6:18 PMfunction foo() output=false {
echo( 'bar' )
}
Then Lucee still buffers that text in memory (wasting heap space) even though you explici8tly told Lucee yuo didn't want to output anythingAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:18 PMfunction foo() output=false {
echo( 'bar' )
abort;
}
and then demanded Lucee should have known that you still wanted to output that text even though you actually said you didn'tbdw429s
09/30/2022, 6:19 PMright so fix thatFix what?? It's working as designed
Adam Cameron
bdw429s
09/30/2022, 6:19 PMAdam Cameron
bdw429s
09/30/2022, 6:20 PMAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:20 PMbdw429s
09/30/2022, 6:20 PMAdam Cameron
bdw429s
09/30/2022, 6:20 PMAdam Cameron
bdw429s
09/30/2022, 6:22 PMfunction outer() output=false {
inner()
}
function inner() output=true {
echo( 'Stuff and things' )
}
outer();
☝️ Even though inner()
outputs text, it's still suppressed by outer()
Adam Cameron
bdw429s
09/30/2022, 6:22 PMAdam Cameron
bdw429s
09/30/2022, 6:24 PMAdam Cameron
function inner() output=true {
then what I output in there should be added to the output bufferbdw429s
09/30/2022, 6:25 PMAdam Cameron
outer
? No. Any output added after the call to inner
, in outer
? Also no.Adam Cameron
bdw429s
09/30/2022, 6:26 PMAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:26 PMcfsavecontent
work??bdw429s
09/30/2022, 6:27 PMsavecontent variable="foo" {
inner();
}
Oh, I'm sorry, you don't get any output because we already sent it to the page buffer?bdw429s
09/30/2022, 6:27 PMbdw429s
09/30/2022, 6:28 PMAdam Cameron
inner
, having been told to capture output, does so until it ends... and passes it back to [something]. that [something] might get discarded later (like if everything upstream is output=false
.Adam Cameron
inner
, the its buffer should be flushed according to its local settingAdam Cameron
bdw429s
09/30/2022, 6:29 PMAdam Cameron
bdw429s
09/30/2022, 6:30 PMAdam Cameron
output=true
on in the function I was aborting in.Adam Cameron
bdw429s
09/30/2022, 6:31 PMAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:31 PMAdam Cameron
Adam Cameron
other than the whitespace between lines isn't adding to the bufferYes so. no problem to solve there. So they could not bother trying. Still: fair cop.
bdw429s
09/30/2022, 6:33 PMbdw429s
09/30/2022, 6:33 PMAdam Cameron
bdw429s
09/30/2022, 6:34 PMAdam Cameron
output=[not set]
? Which is different from output=true
bdw429s
09/30/2022, 6:34 PMAdam Cameron
output=true
also does an implied <cfoutput>
around everything.Adam Cameron
bdw429s
09/30/2022, 6:36 PMbdw429s
09/30/2022, 6:36 PMAdam Cameron
bdw429s
09/30/2022, 6:36 PMAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:38 PMAdam Cameron
bdw429s
09/30/2022, 6:38 PMAdam Cameron
bdw429s
09/30/2022, 6:39 PMAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:40 PMAdam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:41 PMAdam Cameron
Adam Cameron
Adam Cameron
Adam Cameron
bdw429s
09/30/2022, 6:55 PMAdam Cameron
Tags
[#arguments.x#] [2]
Script
[#arguments.x#] [#arguments.x#]
Adam Cameron
bdw429s
09/30/2022, 6:56 PMbdw429s
09/30/2022, 6:56 PMAdam Cameron
bdw429s
09/30/2022, 6:56 PMAdam Cameron