I just installed Watcher on my development site, and after wasting a lot of time with Notifications I am very pleased with it. However, it doesn't work for anonymous users. When I click "You are not watching this post..." it fades out, and then immediately goes back to "You are not watching this post..."
Obviously it is working for some people; any idea what might be wrong here? I tried installing Captcha to see if that made a different, but it did not.
I tested it with Safari and Firefox. I can provide additional system information if that will help.
Comments
Comment #1
solipsist commentedIf you click that link while logged out you should see a form where you can enter your email address. Does it work when you're logged in?
Comment #2
starkos commentedYes, if I am logged in it works great. But when I am logged out I don't see the form. Since it is working for other people I suspect it is something about my particular configuration, but I am not sure what steps to take to diagnose it.
Comment #3
solipsist commentedDoes changing browser make any difference?
Comment #4
solipsist commentedComment #5
starkos commentedThe browser does not make a difference. I have tried Firefox (Mac), Safari (Mac), and IE (Windows). I click the link, it fades out, and the fades right back in with "You are not watching this post..."
Comment #6
solipsist commentedI can't replicate it on my own machine. Is it a fresh Drupal install?
Comment #7
starkos commentedNo, this site has been around for a while -- I just tried setting up a clean install and it works fine there. This site started on 5.x, now on 6.x. I'm not using any crazy setups though, and only a handful of addons: admin menu, marksmarty, feedburner, mollom, pathauto, google analytics.
It's a dev site so I can tear it apart, put in debugging info, whatever. I could just use a clue on where to start looking.
Comment #8
solipsist commentedCan you try disabling your modules one by one until it works? I have a suspicion and I'd be grateful for any assistance confirming it.
Comment #9
starkos commentedI disabled and uninstalled everything except the required core modules (one by one) and it still does not work. When I get back to work on Monday I will try to dig into it more deeply, and see if I can figure out what the code is doing.
Comment #10
solipsist commentedThanks for your efforts. Keep me posted on what you find.
Comment #11
starkos commentedOkay, I finally got a chance to look into this. I tried putting the link URL, which looks like this:
...directly into my browser's location bar. When I navigate to this address I get a "Page not found".
Again, I don't get this on a clean install, so it is possibly bad data on my site. I'll keep poking at it but any ideas on where to look would be much appreciated.
Comment #12
starkos commentedAnd, as always, as soon as I post inspiration strikes and I figure out the problem. There was no uid0 entry in {users} for this site. Somehow the uid for the anonymous user had changed to 85. Now I've got to go figure out what the hell happened, but it isn't a problem with Watcher.
Comment #13
solipsist commentedTricky that one! I'll add a note about it in the README file in case someone else has the same problem. Thanks for posting the solution!
Comment #14
solipsist commentedFor others with the same issue, this SQL query will restore the anonymous user:
Comment #15
starkos commentedActually, in my case the record still existed, but the ID had gotten modified. I've found that it happens when I restore a database dump (in particular, when I load the backup of my production site into my development database). I can restore it like so:
I'm still trying to figure out how to prevent it in the first place. When I do I'll post the answer.
Comment #16
solipsist commentedActually I recall having run into this before now that you describe it to me. When Schema API was introduced and db_next_id() was deprecated making Drupal rely on a database level auto increment counter, an error was introduced. The uid column wasn't conceived to work with a database level increment so it was allowed to hold a 0. MySQL doesn't allow 0 values in auto increment columns, that's why it gets lost during the import as its considered illegal. As a result, the INSERT query above might not work.