Can someone confirm this as a bug please? Shall I add a ticket?
Bug
The Lucee Server/Web Administrator setting CGIReadOnly
(Settings / Scope / CGI read only) is not properly inherited to applications using an Application.cfm, it is always true: getApplicationSettings().cgiReadOnly
. As a result, all CGI writes causing the error: can't set key [foo] to struct, struct is readonly
Reproduce
Set CGI read only
to Writable
and call this Application.cfm:
<cfapplication name="foobar">
<cfdump var="#getApplicationSettings().cgiReadOnly#">
<cfparam name="CGI.foo" default="xyz">
The source causes the error: can't set key [foo] to struct, struct is readonly
Workaround
Explicitly set the value in the application.cfm.
<cfapplication cgiReadOnly="false" ... >
The workaround i fine for me, the post is for others having the same problem.