- Merge request !2872Issue #2880154: Convert comments to be revisionable โ (Open) created by dieterholvoet
- Status changed to Needs work
about 2 years ago 7:09pm 17 March 2023 - ๐บ๐ธUnited States smustgrave
Seems to be some failures in the MR2872
Also the update hook will need upgrade tests.
- ๐บ๐ธUnited States robphillips
Probably should update
comment_user_cancel()
so thatrevision_uid
is re-assigned to zero (0) when the author's account is cancelled. I recently ran into an issue where the comment was re-assigned but not the revision. Seenode_user_cancel()
as an example:node_mass_update($vids, [ 'uid' => 0, 'revision_uid' => 0, ], NULL, TRUE, TRUE);
- ๐ฌ๐งUnited Kingdom jacobupal Leeds
Hey @robbiehobby does your re-roll in #79 include your proposed change in #78?
- ๐บ๐ธUnited States robphillips
robbiehobby โ changed the visibility of the branch 11.x to hidden.
- ๐บ๐ธUnited States robphillips
Opened a new merge request for version 11.x. It includes several bug fixes, improvements, and test adjustments. I did my best to model all changes based on pre-existing solutions in the node revisions implementation.
I havenโt figured out how to resolve the
core/modules/jsonapi/tests/src/Functional/CommentTest.php
test. Maybe someone who is familiar with that test can jump in? The other failing tests do not seem related to these changes, but I could be wrong.There probably needs to be new tests created for comment content moderation and for the user cancel changes. Unfortunately, I wonโt have time to work on these immediately. Please feel free to jump in if you'd like.
- Added the missing revision keys to the config and tests.
- Added the revision UI, links, and access control.
- Kept the existing comment permission structure with
administer comments
being the permission that can perform revision CRUD operations. - Removed the base field alter hook because this should be configured in the content moderation workflow rather than in the code.
- Added shared table indexes for the
comment_revision
table. - Created
comment_mass_update
, a carbon copy ofnode_mass_update
, to primarily handlehook_user_cancel
operations gracefully. It includes a new$syncing
option to prevent the creation of new revisions when reassigning comments to the anonymous user account. A similar issue for nodes exists at [ https://www.drupal.org/project/drupal/issues/3062900] โ ( https://www.drupal.org/project/drupal/issues/3062900 โ ). - Added a comment moderation handler.
- Updated the comment links renderer to be aware of revisions.
- ๐บ๐ธUnited States smustgrave
not reviewed yet but pipeline appears to have test failures.