Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Dear All,
There is an issue with comment delete in this module. The problem is with the code in the notify.module.
Line number: 172
function notify_comment_delete($comment) {
\Drupal::database()->delete('notify_unpublished_queue')
->condition('cid', $comment->cid)
->execute();
}
The $comment->cid should be $comment->id(); there is no variable cid in $comment.
I created a patch for the same
Thanks
Sumith Babu
Comment | File | Size | Author |
---|---|---|---|
#7 | notify-comment-delete-3067931-7.patch | 380 bytes | gisle |
#4 | Notify hunk.png | 30.52 KB | krina.addweb |
#4 | comment-delete-4.patch | 404 bytes | krina.addweb |
comment-delete.patch | 372 bytes | sumithb | |
Comments
Comment #2
sumithb CreditAttribution: sumithb commentedComment #3
gisleThanks for the patch!
Changing status.
Comment #4
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commented@sumithb, As the attached patch throwing hunk error while checking in my local system, I created the new patch for the same & it is working fine for me.
Comment #5
sumithb CreditAttribution: sumithb commented@krina.addweb thanks for updating the patch. I think I missed the last bracket while creating the patch file.
Comment #6
baikho#4 fixes the issue. Marking RTBC
Comment #7
gisleThe reason the patch attached to the issue summary fails is because it does not use the conventional a/ and b/ prefixes for the name of the file. I.e. it starts out with:
instead of:
This makes git apply throw the following error:
The patch in #4 applies cleanly, but breaks the indenting code standard. Attached is a corrected version of the initial patch by sumithb.
Comment #9
gislePushed to the latest snapshot of 8.x-1.x-dev.