Describe the bug
Running the wheels generate admin command generates multiple issues in the produced admin interface.
The generated files contain:
- Incorrect controller inheritance
- Missing
<cfoutput> blocks in views
- Invalid route names such as
admin~users.
- Broken template structure in generated form partials
As a result, the generated admin interface is not fully functional out-of-the-box.
To Reproduce
Steps to reproduce the behavior:
- Run the command:
wheels generate admin User
- Start the development server:
wheels stop && wheels start
- Open the generated controller and views
- Observe invalid controller inheritance, route usage, and malformed view templates
Issues observed
1. Incorrect controller inheritance
Generated controller:
component extends="Controller" {
Expected:
component extends="app.controllers.Controller" {
2. Invalid route names
Generated code uses routes such as:
redirectTo(route="admin~users");
and:
redirectTo(route="admin~user", key=user.key());
These route names are invalid or unresolved in generated applications.
3. Missing <cfoutput> in generated views
Generated view templates contain Wheels helper functions but are missing surrounding <cfoutput> tags.
Example generated view:
#errorMessagesFor(objectName="user")#
#startFormTag(route=local.formRoute, method=local.formMethod, key=local.formKey)#
#textField(objectName="user", property="lastname")#
Expected:
<cfoutput>
#errorMessagesFor(objectName="user")#
#startFormTag(route=local.formRoute, method=local.formMethod, key=local.formKey)#
#textField(objectName="user", property="lastname")#
</cfoutput>
Without <cfoutput>, helper functions are rendered as plain text instead of executing.
Expected behavior
The admin generator should:
- Generate valid controller inheritance
- Use valid route names
- Wrap helper-based templates in
- Generate clean, non-duplicated form partials
- Produce a functional admin interface out-of-the-box
Desktop
Describe the bug
Running the
wheels generate admincommand generates multiple issues in the produced admin interface.The generated files contain:
<cfoutput>blocks in viewsadmin~users.As a result, the generated admin interface is not fully functional out-of-the-box.
To Reproduce
Steps to reproduce the behavior:
Issues observed
1. Incorrect controller inheritance
Generated controller:
Expected:
2. Invalid route names
Generated code uses routes such as:
and:
These route names are invalid or unresolved in generated applications.
3. Missing
<cfoutput>in generated viewsGenerated view templates contain Wheels helper functions but are missing surrounding
<cfoutput>tags.Example generated view:
Expected:
Without
<cfoutput>, helper functions are rendered as plain text instead of executing.Expected behavior
The admin generator should:
Desktop