cfsavecontent not working within Coldbox

I'm stumped with something very simple here. I'm trying to return a
string created in cfsavecontent within a service and output it in my
view. For some reason, no matter what I do, it returns an empty
string. I've dumbed the code down to the barest of bare bones and it
produces the same behavior no matter what.

Inside my handler, I have a very simple event

<cffunction name="doSomething" access="public" returntype="void" output="false">
    <cfargument name="event" type="coldbox.system.beans.requestContext"
      //Get references
      var rc = event.getCollection();
      rc.output = instance.myService.getAString();

I'm injecting the service into my handler and all the functions show
up correctly. Within my service I wrote a very simple method:

<cffunction name="getAString" access="public" output="false"
     var local = {};
  <cfsavecontent variable="local.outputvar">
    this is some other text
  <cfreturn local.outputvar />

Then in my view I just do a cfdump on RC.

Now if I set the content via a cfset as in <cfset local.outputvar =
"this is some other text" it shows up fine when I dump RC. But inside
the cfsavecontent, nothing happens. The output is an empty string with
a length of 0. I'm pretty sure that cfsavecontent works fine within
functions so is it something about how Coldbox puts the data into the
request collection? I'm totally stumped here, this shouldn't be
difficult. Perhaps I'm missing something glaring.

CF 8 standard, Coldbox 2.6.2


And of course I stumble across the answer as soon as I hit the Send
key. Isn't that always the way?

I have enablecfoutputonly set to true and I didn't put a cfoutput
inside my cfsavecontent tags. I've beat my head against that issue
enough by now that you'd think I'd remember. *sigh*



I was about to type that…

It happens :slight_smile: