- same-second migrations sort by name and can run out of order - make:admin-controller output does not boot and names the model after the controller - the DO NOT EDIT header on editable files, and commands that cannot reach the application
1.9 KiB
title, date, priority, area
| title | date | priority | area |
|---|---|---|---|
| make:admin-controller output does not boot and names the model after the controller | 2026-09-30 | medium | summercms.go internal/build |
summer make:admin-controller acme.blog Posts writes a controller and YAML that compile but are not a working admin screen:
ModelName()returnsPostsand both YAML files saymodelClass: Posts, the controller name, where WinterCMS uses the model (Post).fields.yamlandcolumns.yamlgo undermodels/posts/, the controller's snake name, not the model's.- The controller implements only
pact.AdminController. Withoutpact.AdminRecordSource(NewRecord) the admin API answers every record route with a capability error, and withoutpact.AdminPermissionedany signed-in administrator can open it (cabana.Allowstreats an empty list as "any authenticated principal"). - Neither
make:pluginnormake:admin-controllergives the plugin anAdminFS(pact.AdminAssets), so once the admin is enabledcabana.Activatestops the start-up with "plugin acme.blog has admin controllers but no AdminFS". config_list.yamloffers onlycreate; addingdeletealso needsshowCheckboxes: true, which cabana enforces.
Found while writing docs/setup/porting-a-plugin.md (Phase 11.1 plan 05). The walkthrough fixes each point by hand and the page lists them under "What the scaffolder leaves to you".
Suggested fix: give make:admin-controller a model argument or flag (defaulting to the singular of the controller name), write modelClass and the model's YAML directory from it, generate NewRecord and a RequiredPermissions stub with <vendor>.<plugin>.access_<controller>, and have make:plugin embed controllers/*/*.yaml models/*/*.yaml and implement AdminFS (with a harmless empty tree until the first controller exists). Update docs/console/scaffolding.md and the porting page in the same change. internal/build is outside the docs phase boundary, so it is not changed in Phase 11.1.