By Torenware on
I've set up a 4.5.2 site and installed the Event module; I display the "Upcoming Events" block on the left side.
Everything is fine if the user is logged in. But for the anonymous user, each event displays 3 times in the Upcoming Events block. I'm using the module in several Drupal 4.5.2 sites, and this one is the only one with the problem.
I suspect (but haven't been able to prove) that there's interaction between the modules installed, since this site has unusually many active. Before I go through the standard "deactivate half, then swap" approach to see if this is the case, I figured I'd ask if anyone has seen this problem, and how they solved. it.
Thanks,
Rob Thorne
Torenware Networks
Comments
How Best To Debug This Problem?
Any advice how best to debug this? I'm especially looking for a good way to get a "stack trace", since while I don't know who's calling the Event block code 3x, I at least know what code they're calling.
Thanks,
Rob
Rob Thorne
Torenware Networks
Eval is tripping me up
I tried installing the TWM-logger package (http://threewisemen.ca/twm-logger.jsp), and probably learned something a bit annoying: it looks like event.module is eval'd, so as far as the stack trace is concerned, that's as far as it goes.
Where is a better place in the code to listen? I'm guessing that I want to listen on the side that calls the hook, rather than on the other side.
Thanks,
Rob
Rob Thorne
Torenware Networks
Incorrect SQL Generated For Non-Admin Users?
OK, last try. If I am logged in as the admin, here is the SQL generated to get the events (I've added a little formatting to make it easier to read):
But here is the SQL generated for a simple authenticated user, or an unauthenticated user (both cases, it turns out, display each event 3 times.):
Does anyone reading this understand what the nodeperm_user module is trying to do here? Inner Join is a little new to me, so it isn't clear (1) what the SQL does, and (2) what the SQL ought to be doing.
Thanks,
Rob
Rob Thorne
Torenware Networks
Re: Incorrect SQL Generated For Non-Admin Users?
The queries above should have a SELECT DISTICT(n.nid) in the beginning since it is possible for an nid in this query to show up more than once.
Also, it seems you are using organic groups (og_group0, ogroup1 ?) and that module also seems to be doing something to the permissions scheme.
Ankur Rishi
(CivicSpace)
Culprit Appears To Be node_privacy_byrole
I've seen a report of a problem that looks comparable:
Module does not work correctly - all node types
I'm linking that issue to this post, and this links it back.
Thanks,
Rob
Rob Thorne
Torenware Networks