postgresql mp_calendarevents_select_bydate returns all events

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
6/27/2005 9:33:16 AM
Gravatar
Total Posts 36

Re: postgresql mp_calendarevents_select_bydate returns all events

the stored procedure on postgresql for selecting by date range seems to return all events. I don't know much about pgsql stored procedures but the offending part seems to be the checking for null

where moduleid = $1
AND ($2 = '' OR eventdate >= $2)
AND ($3 = '' OR eventdate <= $3)

the data in the db seems to be appropriate:

however? http://getsweaaa.com/~tjfontaine/pgsql_calendar_bydate.png shows all the events regardless of the date that is supposed to be viewed.

This happens regardless of platform or web server (i.e. ms.net / mono and xsp / iis)

I presume the reason this is overlooked is that because the Calendar only shows events bound for the current viewing area (date range, 30/31 days). A workaround could be done in EventCalendarViewEvent to only show the proper date but that isn't preferred.

Tested on mono 1.1.8 and svn
xsp latest release and svn
ms.net 1.1 and iis (XP)
6/27/2005 10:24:10 AM
Gravatar
Total Posts 36

Re: postgresql mp_calendarevents_select_bydate returns all events

of course when I said "EventCalendarViewEvent" I meant "EventCalendarDayView"

attached is the workaround I am currently using, though it isn't prefered as it's doing the work that pgsql should be doing.

Index: EventCalendarDayView.aspx.cs
===================================================================
--- EventCalendarDayView.aspx.cs??? (revision 215)
+++ EventCalendarDayView.aspx.cs??? (working copy)
@@ -100,19 +100,13 @@
DataSet ds = CalendarEvent.GetEvents(this.ModuleID, theDate.ToShortDateString(), theDate.ToShortDateString());
DataView dv = ds.Tables[0].DefaultView;
dv.Sort = "StartTime ASC ";
this.rptEvents.DataSource = ds;
this.rptEvents.DataBind();
}

DataView dv = ds.Tables[0].DefaultView;
dv.RowFilter = "eventdate >= '"+theDate+"' and eventdate <= '"+theDate+"'";
+this.rptEvents.DataSource = dv;
+ this.rptEvents.DataBind();
}
}

#region Web Form Designer generated code
6/27/2005 10:33:23 AM
Gravatar
Total Posts 36

Re: postgresql mp_calendarevents_select_bydate returns all events

Argh, of course that breaks under mono but works fine under ms.net + iis

more dogfood I suppose, I'll work up a bugreport for them on that
(btw great blog )
6/27/2005 12:42:49 PM
Gravatar
Total Posts 36

Re: postgresql mp_calendarevents_select_bydate returns all events

the DataView RowFilter bug is now found at http://bugzilla.ximian.com/show_bug.cgi?id=75395
6/27/2005 3:44:45 PM
Gravatar
Total Posts 18444

Re: postgresql mp_calendarevents_select_bydate returns all events

Yes I see you are right. I'll try to fix that in the next day or so. My demo site demo.mojoportal.com is using Postgre and I was able to produce the symptom there. I don't think it happens in the other data layers. It definitely needs the fix in the stored procedure.

Thanks for reporting this!

Joe
You must sign in to post in the forums. This thread is closed to new posts.