Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
I get the following notice whenever I approve a comment:
Undefined property: stdClass::$notify_type in comment_notify_comment_update() (line 254 of/home/tgeller/webapps/tomgeller/sites/all/modules/comment_notify/comment_notify.module).
Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#8 | 1354990_less_notice.patch | 872 bytes | greggles |
Comments
Comment #1
scottrigby@tgeller: have you tried 7.x-1.x-dev? It looks like http://drupalcode.org/project/comment_notify.git/commit/8e1ca98 may have fixed this issue. It seemed to in my case, so marking as a duplicate of #1224958: Notice: Trying to get property of non-object line 418 comment_notify.module unless you find otherwise
Comment #2
tgeller CreditAttribution: tgeller commentedThanks, Scott. I haven't tried -dev; I'll report if it's still a problem with the next stable version.
Comment #3
Dimetrius CreditAttribution: Dimetrius commented+ 1 I have the same error
Comment #4
harriska2 CreditAttribution: harriska2 commentedSame here and I'm using the dev version. It happens with an anonymous user clicking on "all comments" or "replies to my comment." Email doesn't send to the anonymous user but it does send to others. Anonymous is set to give email in comments.
Comment #5
chriscohen CreditAttribution: chriscohen commentedConfirmed that the dev version does not fix this issue. It's actually pretty clear that it doesn't, since the lines in question haven't been altered, and nothing else affects that behaviour that has been committed to dev!
I don't think it would take much to fix this, as it's just a failure to check whether a value is set.
Comment #6
mermentau CreditAttribution: mermentau commentedConfirming that this issue is still alive with the latest dev dated May 14, 2012. It is shown when comments are published or unpublished in /admin/content/comment The anonymous commenter does get notified though.
Comment #7
gregglesI think this was more of an annoyance than anything, but it definitely wasn't great.
Here's a patch that I think works. It's a little tricky to review because this code affects create, editing, and publishing of comments so you have to test a lot of scenarios. I don't plan to commit this until after the next release because it has the possibility of introducing weird, hard to find bugs.
Comment #8
gregglesand I forgot the patch. ugh.
Here it is.
Comment #9
willkaxu CreditAttribution: willkaxu commentedClean install Drupal 7.14 and Comment Notify 7.x-1.x-dev, greggles's patch works well! Thanks!
Comment #10
gregglesOk, now committed http://drupalcode.org/project/comment_notify.git/commit/ed08170 to help get testing in the dev branch.
Comment #12
OddJob CreditAttribution: OddJob commentedI received the same error. I can also confirm that either applying the patch or installing the 7.x Dev version of the module (Aug 14) resolved the issue. I applied the patch first. Then in a clean install of Drupal 7 I installed the Dev version. In both cases the error did not reoccur.
I also ran coder against the module. I posted the findings under open issues.