Issues

Select view

Select search mode

 

LUCEE_INSPECT_TEMPLATE setting is ignored

Won't Fix

Description

via slack https://cfml.slack.com/archives/C06TA0A9W/p1742244658667689

I’m trying out Lucee 6.2.1 and have set the Inspect Templates option to Never  in our base image (based on our .CFConfig.json file for our base image). How do I make it so that it will inspect template changes always (or Once) when developing locally? It doesn’t appear there is an Application.cfc setting for this, but the Admin does reference a System Property or Environment Variable (see screenshot). I used that env variable of LUCEE_INSPECT_TEMPLATE="once" in an .env file for an app, similar to LUCEE_EXTENSIONS to install whatever extensions I want, but it doesn’t seem to respect the env variable for the inspect template option. The Admin always shows “Never” and I have to restart the container to reflect any changes.Is anyone solving this a different way? I want to never inspect template changes in Prod, QA, DEV, but Always (or Once) locally.

Environment

None

Attachments

2
  • 21 Mar 2025, 01:13 pm
  • 21 Mar 2025, 12:22 pm

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Created 18 March 2025 at 10:41
Updated 3 days ago
Resolved 3 days ago

Activity

Show:

Zac Spitzer21 March 2025 at 15:06

LUCEE_EXTENSIONS is cumulatively applied each time lucee starts, it's indeed a different beast to other ENV settings

Off the top of my head I can't think of other different situations, many ENV vars don't have a corresponding CFconfig setting, so they are always just applied at runtime

Dan Murphy21 March 2025 at 14:51

In reference to the Configuration Hierarchy, is LUCEE_EXTENSIONS a “special” environment variable? Because that does override the .CFConfig.json. Are there others like that? LUCEE_INSPECT_TEMPLATE does not, obviously, so just trying to understand what the situation is. Thanks!

Matthew Clemente21 March 2025 at 13:22

I think my issue was that I didn’t understand the Configuration Hierarchy - and I didn’t expect/realize that the CFConfig.json would get written when an image was warmed up. Once it’s written, the ENV is ignored for subsequent container runs, which tripped me up. I mentioned in the dev forum post about this, that "inspectTemplate": "{env:LUCEE_INSPECT_TEMPLATE}"` gets us the behavior we want, with the ability to toggle the setting, based on environment.

Zac Spitzer21 March 2025 at 13:13

this works, but you can’t change the setting in the admin, needs to only be read on startup?

https://github.com/lucee/Lucee/blob/6.2/core/src/main/java/lucee/runtime/config/ConfigWebFactory.java#L4320

String strInspectTemplate = SystemUtil.getSystemPropOrEnvVar("lucee.inspect.template", null); if (StringUtil.isEmpty(strInspectTemplate)) { strInspectTemplate = getAttr(root, "inspectTemplate"); }

Zac Spitzer21 March 2025 at 11:58
Edited

this has been raised again, it’s currently not matching expected behaviour

https://dev.lucee.org/t/possible-bug-with-lucee-inspect-template/14858/8

this sums up what I think the problem is? the env var should override (only) the top level setting?

Flag notifications