Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter samijones

    (@samijones)

    Ok, so it seems that if I increase the “limit” more events show up. I had it at limit=10 and all of todays events show up. Is there a way to limit it to 4 or 5 and have today’s events appear?

    kenrichman

    (@kenrichman)

    yes, I have this problem. It seems to show events in the order of creation date not the order of the event, and this is completely wrong for its intended purpose.

    I too am having this issue. Makes no sense that it selects upcoming events by creation date instead of event date. Very confusing when event creation chronology can be completely different than the event date. Any update on this problem?

    This is definitely a code bug and is caused when there are a lot of repeating events, because repeating events are not handled correctly. We use tons of repeating events, perhaps 25 or more per month. The problem is in the SQL in db_query_events function of ajax_events_calendar.php. Because repeating events are stored in AEC_EVENT_TABLE with the first occurrence date (date and time), the ORDER BY start clause will always sort repeating events to the top over non-repeating events. If the eventlist limit is increased to a number greater than the number of repeating events, then the non-repeating events start showing up again. However, for us, setting the limit to 25+ events in a sidebar widget is far too many. So this bug basically makes the eventlist widget unusable on our site. The SQL is broken for eventlist and needs to be fixed.

    Example events:
    Event1: 2013-05-05 08:00AM – 08:15AM No repeat
    Event2: 2013-04-28 08:15AM – 09:15AM Repeat weekly until 2013-12-31
    Event3: 2013-04-28 09:30AM – 10:15AM Repeat weekly until 2013-12-31
    Event4: 2013-04-28 11:00AM – 11:45AM Repeat weekly until 2013-12-31

    Looking at eventlist limit=3 on 2013-05-04 (1 day before all these events on 2013-05-05), Event1 does not display because the repeating events order higher than the non-repeating event. Event1 should display in this case and Event4 should not. Herein lies the problem.

    If you change limit=4, Event1 will display correctly.

    Unfortunately, there is not a simple fix for this in the SQL (or I would hack it myself), because of how repeating events are stored as a single row in the table with only the first occurrence date. Basically, for a repeating event, the “next” occurrence date needs to be calculated and used for sorting.

    This problem is also discussed in this wp-aec project page:
    https://code.google.com/p/wp-aec/issues/detail?id=189&can=1&q=eventlist

    Yes, there is a fix, as I think you are having same problem I had.
    See my post “Bug in EventList shortcode for a simple patch (adding 2 lines)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Widget Not Working’ is closed to new replies.