You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
API Author is too generic for a reserved name
In an upgrade from a CMS3 site to CMS4 a custom model extending
Page
withAuthor
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 ofVersioned::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
Author
/AuthorID
inVersioned
to something less generic (e.g.VersionAuthor
)The text was updated successfully, but these errors were encountered: