The function comment_user_cancel uses COMMENT_NOT_PUBLISHED which was removed in Drupal 8.
We need to change that to CommentInterface::NOT_PUBLISHED.

Comments

gremy’s picture

Title: comment_user_cancel uses COMMENT_NOT_PUBLISHED » comment_user_cancel() uses COMMENT_NOT_PUBLISHED
bogdan.racz’s picture

Assigned: Unassigned » bogdan.racz
bogdan.racz’s picture

StatusFileSize
new632 bytes

I have updated the constant with the proper one - CommentInterface::NOT_PUBLISHED.

bogdan.racz’s picture

Status: Active » Needs review
gremy’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

I looked the patch and it looks OK to me.

Also I searched the entire Drupal core and besides this place there is no definition COMMENT_NOT_PUBLISHED, and this is the only place where it was called.

I think that we need some tests to be written for this issue.

gremy’s picture

Issue summary: View changes
swentel’s picture

Priority: Critical » Major

Ok, this is not extremely critical, but still major though.

larowlan’s picture

Good find thanks

gremy’s picture

StatusFileSize
new3.12 KB
new2.5 KB

Updated the UserCancelTest->testUserBlockUnpublish() test.
Created patch with the test only, so that if it fails we know it works.
Rerolled rbmboogie's patch with the test included, so that if this patch passes the tests we can confirm that the patch works.

gremy’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 9: 2227465-9-comment-unpublished-constant--test.patch, failed testing.

larowlan’s picture

Status: Needs work » Reviewed & tested by the community

Awesome work. For next time, uploading the failing test first will ensure bit doesn't change the status.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit 669b898 on 8.x by catch:
    Issue #2227465 by gremy, rbmboogie: comment_user_cancel() uses...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.