-
Notifications
You must be signed in to change notification settings - Fork 333
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
FIX: Remove legacy fields which prevent page publish (fixes #2455) #3002
FIX: Remove legacy fields which prevent page publish (fixes #2455) #3002
Conversation
@@ -1693,7 +1703,7 @@ protected function onBeforeWrite() | |||
} | |||
|
|||
// Check to see if we've only altered fields that shouldn't affect versioning | |||
$fieldsIgnoredByVersioning = ['HasBrokenLink', 'Status', 'HasBrokenFile', 'ToDo', 'VersionID', 'SaveCount']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HasBrokenFile
and HasBrokenLink
are the only two fields that actually exist anymore.
I thought about changing VersionID
to Version
(which is what the field is now named), but that would be a behavioural change. It would also be a bit weird: changing the version number in the SiteTree
table without writing a version would mean that SiteTree
and SiteTree_Versions
could end up out of sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, thanks!
Can you please retarget this to 5.2
? That branch is still supported for bug fixes so it'd be good to get the fix in there instead of having to wait for 5.3.0 stable to release.
7bd4d03
to
3ddec1c
Compare
3ddec1c
to
42f72f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, works well locally.
Description
This updates the list of fields which are ignored when deciding whether a new version (and therefore a new live version) should be created. Also made it configurable while I was there.
Manual testing steps
Create a page type with a field
Status
, save and publish. Then change only the status field and publish again: a new version won’t be written, and the live site won’t update. If you change status and something else, it will.Issues
Pull request checklist