-
Notifications
You must be signed in to change notification settings - Fork 241
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
EZP-29096: Do not store empty draft values in DB #1417
Conversation
Nice! 👍 We should aim to place this one 2017.12 and up. As for Travis, unsure why but tests seems to fail with:
|
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.
Agree on 2017.12, and we must figure out why that test breaks.
onPublish() fails because there is no user object. Seems the code expects the draft to have been stored, so bigger changes are needed. |
Co-Authored-By: pkamps <[email protected]>
Co-Authored-By: pkamps <[email protected]>
Are tests passing with the latest commit? |
@peterkeung No, sorry. Don't you have access to see the results? Travis says |
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.
Tests pass! 🎉 🙌
Some CS issues and minor grumbles, and questions about other changes, in particular the getSerializedPasswordHash change.
// only if the object version is a draft (status == 0) | ||
if( | ||
$user->Login && | ||
$contentObjectAttribute->attribute( 'object_version' )->attribute( 'status' ) == 0 |
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.
$contentObjectAttribute->attribute( 'object_version' )->attribute( 'status' ) == 0 | |
$contentObjectAttribute->attribute( 'object_version' )->attribute( 'status' ) === 0 |
Or can this be a string? I would not think so.
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.
Hope you don't mind if I ignore it. Maybe it's a string and then it would hurt to be extra strict here.
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.
We ought to be strict, strictly speaking ;) eZContentObjectVersion says it's an integer. But I see many cases where we aren't strict, so I guess this can pass if others agree.
Co-Authored-By: pkamps <[email protected]>
Co-Authored-By: pkamps <[email protected]>
Co-Authored-By: pkamps <[email protected]>
Co-Authored-By: pkamps <[email protected]>
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
* EZP-29096: Do not store empty draft values in DB (cherry picked from commit 1adb33d)
The issue and steps to reproduce it are described here:
https://jira.ez.no/browse/EZP-29096
Or use those steps:
This patch will prevent the user creation to store any draft data into the DB unless the editor specified a user login.