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

API Author is too generic for a reserved name #370

Open
muskie9 opened this issue Aug 16, 2022 · 0 comments
Open

API Author is too generic for a reserved name #370

muskie9 opened this issue Aug 16, 2022 · 0 comments

Comments

@muskie9
Copy link

muskie9 commented Aug 16, 2022

API Author is too generic for a reserved name

In an upgrade from a CMS3 site to CMS4 a custom model extending Page with Author as a field no longer rendered the value of that field.

Currently Documented Workarounds
In silverstripe/cwp#209 a workaround was noted as creating a new method to return the expected value. This is possible, but should not be required as the term Author is a very generic term and likely should not be inherently reserved.

Possible Solutions
Updating AuthorID in $db_for_versions_table config to a Versioned specific naming convention would make the current implementation less generic. This would then require a change to the naming convention of Versioned::Author() to reflect the change.

As a part of upgrading (assuming to a new major version), a basic task running a wholistic DB::query() call to move the data, then clear the existing column could be an option. This would need a bit more thought to ensure there are no negative consequences to the data move as it relates to supported modules and ensuring that data is preserved.

Acceptance criteria

  • Rename Author/AuthorID in Versioned to something less generic (e.g. VersionAuthor)
  • Provide migration task to ensure data integrity when upgrading to new major version that includes this change
  • The changelog makes it very clear what is needed to upgrade
  • Perhaps there should be some fallback or clear error message for people who don't read the changelog?
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

2 participants