Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaffold fields for SiteTree #2767

Closed
maxime-rainville opened this issue Aug 24, 2022 · 0 comments
Closed

Scaffold fields for SiteTree #2767

maxime-rainville opened this issue Aug 24, 2022 · 0 comments

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Aug 24, 2022

When you define DB fields for a regular DataObject, getCMSFields will scaffold them for you.

SiteTree doesn't do that. So you have to manually created all the fields. We should remedy this.

Maybe we provide an option to disable that to minimise upgrade pain.

Note

Acceptance Criteria

  • SiteTree::getCMSFields() calls parent::getCMSFields() (which will autoscaffold fields)
  • Custom logic in SiteTree::getCMSFields() is wrapped in $this->beforeUpdateCMSFields() so extension hooks are called appropriately
  • The changelog makes it very clear that this change is happening, and that developers should check their implementations of getCMSFields() in their page classes to ensure things are working the way they expect (e.g. autscaffolded has_many and many_many relations may be giving them new tabs that weren't there before)
  • All native Page type are revisited to validate that:
    • the FormFields are still displayed in the same tab as they were before
    • to remove redundant scaffolding logic
    • no new form fields are added to existing pages.

CMS 5 PRs

CMS 6 PRs

kitchen sink CI run
recipe-reporting failure is expected because we're forking framework for that CI run.
Compare with normal CMS 6 run for other failures.

@GuySartorelli GuySartorelli added this to the Silverstripe CMS 6 milestone Sep 8, 2023
@GuySartorelli GuySartorelli self-assigned this Aug 7, 2024
This was referenced Aug 8, 2024
@GuySartorelli GuySartorelli removed their assignment Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants