ViewsHelper not found from rendering layout + view in submodule with Scheduled task

Description

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 :

In the “tasks” module, it contains the Scheduler.cfc in the config folder :

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 report, 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 render code from TaskService.cfc:

 

I also attached a couple screenshots of the code throwing the error. Apologies ahead if any of this is unclear, but any help or direction is greatly appreciated! Thank you for your time.

Attachments

6

Activity

Show:

Luis Majano March 21, 2025 at 10:20 AM

Can I get a few more pieces of info please

  • What CFML Engine are you on

  • Can I see the TaskService code

  • Can I see your ColdBox.cfc configuration as well please

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Priority

Sentry

Created March 20, 2025 at 7:16 PM
Updated last week