(line 58 of C:\XAMPP\htdocs\drupal_head\sites\all\modules\comment_notify-HEAD\comment_notify.lib.inc).

Set up: create a node. add comments to the node.

Click on the comments link below the node.

This error message seems to happen only when I am accessing the comments through user id 1.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Status: Active » Needs review
FileSize
2.09 KB

There's a couple things I found which may be causing this and are also causing weird behavior related to it.

To repeat this: be sure you don't save your user account after installing comment_notify.

vegantriathlete’s picture

Just to make it clear how to test this.

Create a user without having comment_notify enabled; it is irrelevant if it is uid 1. Then enable comment_notify and access comments. You will get the error message.

I still haven't updated the uid 1 profile, so it still doesn't have those preferences set. Patch fixes problem.

vegantriathlete’s picture

Actually, somehow it does seem to be related to my uid 1. I can't recreate the problem for other authenticated users. I even disabled and uninstalled comment_notify and created another user. That user didn't get the error message.

Nonetheless, the patch appears to fix the problem.

greggles’s picture

OK. Here's a more robust patch that fixes this problem in a few places and fixes a mismatch between function name and the variable it returns.

vegantriathlete’s picture

I have reversed the first patch, tested with this patch, and confirmed that this patch also takes care of the problem.

greggles’s picture

Title: Notice: Trying to get property of non-object in comment_notify_get_user_comment_notify_preference() » Preference retrieval functions not returning proper defaults and removing dead code cruft in user_load
Assigned: Unassigned » greggles
Status: Needs review » Fixed

Now fixed - http://drupal.org/cvs?commit=350840

Thanks for testing, vegantriathlete!

Status: Fixed » Closed (fixed)

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