Hi there!
First off, just want to thank you all for the amazing work being done on this project!
We’re running into a bit of an issue when trying to render a layout + view combo in our Service being called by a Scheduler.cfc, it’s basically an automated task that will send an email report once it has completed. We’re currently on v6.7.0 of Coldbox, we’ll eventually plan on upgrading our client projects to v7.
The setup is as follows :
/coldbox
/config
...
/modules_app/admin
/modules_app/admin/modules_app/tasks
In the “tasks” module, it contains the Scheduler.cfc in the config folder :
/modules_app/admin/modules_app/tasks/config/Scheduler.cfc
This Scheduled task calls a function in the “tasks” module service : TaskService.cfc
The problem is that when the task runs and is completed, it tries to render a layout + view combo from the submodules (layout from “admin” module, and view from “tasks” module) to send an email rapport, but the Renderer.cfc
/ RendererEncapsulator.cfm
tries to include the viewsHelper.cfm
from the root of the project, but seems like it can’t find it in this context, so it throws the following error :
MissingFileName : //includes/helpers/ViewsHelper.cfm
The Renderer is being called from the Scheduler object directly, as I passed that into the Service, it looks like this :
local.emailBody = arguments.scheduler.layout(
view='email/taskCompletion',
viewModule="tasks",
layout="email",
module="admin",
args={ ... }
);
I apologize in advance if any of this is unclear, but any help or direction is greatly appreciated! Thank you for your time.