Closed (fixed)
Project:
Event Views
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Aug 2006 at 10:47 UTC
Updated:
29 Sep 2006 at 09:30 UTC
Jump to comment: Most recent file
Creating a Table view of upcoming events (filtered by date > now), the table that is derived gets confused by repeat events.
See the attached jpg.
It seems that when the Views module hits the first repeat event, it then skips everything until the next event in the repeat sequence.
Really, we need the module to take all events in sequence, so that (in my case) the table would show events on 10/4, 10/5, 10/6, etc. and then show the next event in the repeat sequence.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | event.node.jpg | 61.68 KB | gmak |
| eventlist.jpg | 221.49 KB | gmak |
Comments
Comment #1
karens commentedI haven't worked with event repeat so I am not sure what it is doing to create the repeat events. I am guessing that something about them looks just the same and that is why they are getting grouped together. Do you have the 'distinct' filter on this view? If so, try removing it.
If that doesn't work, post back with an export of the view you are using, and tell me what the repeated events look like in the database (do they share a nid? Do they have the same name?) and I'll see if I can figure out what else to try.
Comment #2
gmak commentedKarenS,
The problem exists whether 'distinct' is used or not.
This is the view export:
With regard to repeated events; they have the same title but have different nid's.
As far as I can see, the eventrepeat module adds three tables to the database: event_repeat, event_repeat_calendar_map, event_repeat_nodes. The relationship between the event table and the repeat event seems to be via the nid which then maps to an rid (in the event_repeat table). See the attached jpg.
Comment #3
karens commentedI can't reproduce this. I installed event repeat and created some dates, than created a view and the repeat events showed up as individual events in the view just as they should. I tried it both with and without the node distinct filter and it worked both ways.
I'll play with it a bit more, but there must be something else unique about your installation that is affecting this. What other modules do you have enabled? What php version are you using? What database OS?
Comment #4
karens commentedThe only other thing I saw that might affect results is the event repeat settings where you select whether or not to make your events part of a repeat sequence. Which option did you select there? I don't understand yet exactly what that option is doing, but maybe it's a factor.
Comment #5
karens commentedOne other thought -- You have a filter in your view for event_start > 'now'. Are the missing dates earlier or equal to 'now'? If so, they won't show up, of course.
Comment #6
gmak commentedOS = Linux (Fedora Core 4)
PHP = 5.0.4
DB = MySQL 4.1.1
In the settings for repeat event module, I do not have the keep in sequence box ticked.
The dates for the view are well in the future (more than 30 days) so the '>now' filter should not exclude them.
Comment #7
karens commentedStill can't replicate it. Could you install the devel module and set it up to display queries, then go to the view that is displaying wrong and scroll down and look at the queries. You will see 2 queries called by pager_query. Could you copy and past those in a message. Obviously something is wrong in the query, but I don't think I can take this any further without seeing what queries are being generated.
Thanks.
Comment #8
karens commentedOne more thing to try, if you have something like phpmyadmin you can use. Paste the second query you find in the step above into the SQL box in phpmyadmin and see if it pulls up a list of the right events that way.
Comment #9
gmak commentedWell, using the devel module is a bit scary. My site shows up loads of notices about "undefined indexes" and "undefined properties". Is that normal?
Anyway, these are the two page_query calls that showed up:
3.26 0 pager_query SELECT count(DISTINCT(node.nid)) FROM node node LEFT JOIN event event ON node.nid = event.nid WHERE (event.event_start > (1157406597 + 0))2 0 pager_query SELECT DISTINCT(node.nid), node.title AS node_title, node.changed AS node_changed, event.event_start AS event_event_start, event.event_end AS event_event_end, node.type AS node_type FROM node node LEFT JOIN event event ON node.nid = event.nid WHERE (event.event_start > (1157406597 + 0)) LIMIT 0, 10Also, when I plug the second query into phpMyAdmin, I still get the incorrect output. It is skipping things between the first date of the repeat and the second date of the repeat.
Comment #10
gmak commentedJust to let you know, I had been using a fairly heavily patched Event module. So, I just swapped this out for a copy of the most recent Event module and Event Repeat.
But, the problem persists.
Thanks, again, for your assistance.
Comment #11
karens commentedThe query looks fine and *should* be returning a record for each nid. There must be duplicate or missing nids in one of your tables, that's the only possible reason this query wouldn't work. The event repeat table is not joined in, so that's not a factor, only the node table and the event tables. I need you to look at both and make sure all the relevant nodes exist as indvidual nids in both tables. What I'm thinking is that if you've been using a patched copy of the event module, maybe it wasn't creating a record in the event table for each repeat -- something like that would give you the results you are seeing.
Comment #12
karens commentedAlso, double check that each of the missing nodes has a value for event_start in the event table that is greater than 1157406597.
Comment #13
gmak commentedI've checked the database tables.
The nodes (nid's) are all there. They match up between the node table and event table. All of the nodes have start times that are after 1157406597.
This is very odd.
If it would help, I could email you some access information so you could look at things more directly. For all I know, I might be reading something wrong (my PHP & SQL skills are still quite novice like).
Comment #14
karens commentedI'm pretty convinced at this point that there is no problem in the module, so I'm marking this fixed. The query that is being created looks just like it should look, so I think it must be something in your database or configuration. Yes, go ahead and email me and I will try to help you get this working.
Comment #15
gmak commentedCheck out this page: http://www.baade.org/node/425
This is using this snippet:
As you can see, it is getting the events in the right sequence, including repeats.
Given, this, I wonder if there isn't something related to the query or handling the results of the query coming from Views.
Thanks
Comment #16
gmak commentedHave you had a chance to look into this any further? Thanks
Comment #17
(not verified) commented