Posted on: 12/07/07 09:23pm
By: Anonymous (earnest)
Whenever I try to save an event, either adding a new one or editing an existing one, I get the following error
12/07/07 21:05:23 - 1292: Incorrect date value: '' for column 'date_end1' at row 1. SQL in question: UPDATE gl_evlist_events SET
id = '20070924175337252',
title = '4th example: recurring events', summary = 'Like example #3, this is a recurring event. A recurring event is an event that recurs according to a particular pattern. For example, an event may be set to recur once per year. If it is, then that event will be displayed in the event list that often.',
full_description = '<p>No matter the date and time information that you\'ve entered, if an event is set to recur, then it will--then it will. If you check the recurring event box further fields will be presented to collect such information as how often the event will recur and when it will stop recurring if it indeed does stop recurring. An end date is not required for any event, even a recurring event.</p>
<p>A number of basic formats are available to use for your event. Daily, monthly and yearly events are pretty basic. You can also choose to have an event recur on particular days per week, or on a particular day (e.g., 2nd sunday) per month. You may alternatively supply a list of dates upon which the event should recur.</p>
<p>An ending date is not required for recurring events, or for any events actually. If supplied, the event will only be displayed up to the end date, otherwise the event will continue to be displayed. A default display range for recurring events is hard-coded into the software to limit the number of events that are displayed. For example, if you have a daily recurring event that will recur for a year, only one month worth of recurrences will be displayed ahead of now. This default range is different depending upon the format chosen.</p>
<p>Depending upon the format chosen, recurring events might land on weekends and if that is not desired then you have the choice skip the event or to force it to the next business day. This applies to the daily (next business day not available for daily option), monthly and yearly by date formats.</p>
', date_start1 = '2006-2-14',
date_end1 = '', time_start1 = '00:00:00',
time_end1 = '', date_start2 = '',
date_end2 = '', time_start2 = '',
time_end2 = '', url = '', location = 'This event takes place everywhere!',
street = '', city = '', province = '',
country = '', postal = '', recurring = '1',
rec_option = '3', rec_data = '', allday = '1',
split = '0', contact = 'Cupid', email = 'lovehurts@joybliss.he',
phone = '555-love', status = '1',
postmode = '2', enable_reminders = '1',
owner_id = '2', group_id = '2',
perm_owner = '3', perm_group = '2',
perm_members = '0', perm_anon = '0'
WHERE id = '20070924175337252' LIMIT 1
Help??? :shock:
Re: EVLIST Error
Posted on: 12/07/07 09:50pm
By: machinari
well, my first guess is that you are using MySQL 5 in strict mode, which won't allow you to pass an empty value to that date column. I should probably change that. Until then, try switching off strict mode. If that's not it, let me know.
Re: EVLIST Error
Posted on: 12/07/07 11:58pm
By: Anonymous (earnest)
That's it. Thanks. Is there a way to change the default time format in Evlist? Right now it is in military time. Could we make 19:00 into 7:00 pm?
Thank you for helping.
Re: EVLIST Error
Posted on: 12/08/07 12:07am
By: machinari
there is an option to change your time format from the evlist admin panel.
Re: EVLIST Error
Posted on: 12/08/07 01:03am
By: Anonymous (earnest)
I'm sorry. I seem unable to find where to change the time format. When I enter the evlist admin panel, I see only a listing of events.
ALSO, can you tell me why I don't seem able to enable email notifications? When I add the event I click the option, but no email field appears?
Re: EVLIST Error
Posted on: 12/08/07 01:18am
By: machinari
on the admin panel page you should have a link at the top near the icon that reads, "evList Config." That is where your time format option and other configuration options can be found including the option to enable/disable email notifications globally.
Also keep in mind that I've set up the email notification form not to display within a week or so of the event. That may become configurable in the future.
Re: EVLIST Error
Posted on: 12/08/07 01:34am
By: Anonymous (earnest)
Thanks so much for your reply.
I don't seem to have the evlist config link. I have evlist in the Admins only menu, but it only displays a listing of defined events. No Evlist Config link at the top. I am running 1.1 for GL 1.4.1. Maybe there is a later version?
Re: EVLIST Error
Posted on: 12/08/07 01:43am
By: Anonymous (earnest)
Something is definitely wrong. When I define a recurring event and leave the "Specify the year and month beyond which this event will not recur, if any" field empty, evlist fills it in anyway (with December 2007). Even when I remove it and then save it, the same thing happens. Does this plugin need register globals on?
Email notification works if I define the event more than a week out. Any reason why this is the case? Anyway to change this?
Re: EVLIST Error
Posted on: 12/08/07 01:57am
By: machinari
no this doesn't need register globals on. I don't know what's going on with that date thing. I'm not able to reproduce it without more information.
i've answered the question about the notification form already..
..and have a look at
this pic[*1] for what the admin page should look like. notice the link on top. anyway, type the link in manually: http://example.com/admin/evlist/index.php?mode=config.
Re: EVLIST Error
Posted on: 12/08/07 02:08am
By: machinari
Quote by: earnestWhen I define a recurring event and leave the "Specify the year and month beyond which this event will not recur, if any" field empty, evlist fills it in anyway (with December 2007).
If you specify a year, but not a month for the beyond date while setting an event to recur monthly, then you get a beyond date corresponding to the last month of the year you specified. otherwise, if no date is passed, then no date is stored.
Re: EVLIST Error
Posted on: 12/08/07 02:46am
By: machinari
Quote by: earnestEmail notification works if I define the event more than a week out. Any reason why this is the case? Anyway to change this?
You can find the following in event.php about line 329ish:
Text Formatted Code
//reminders must be enabled globally first and then per event in order to be active
if ($S['enable_reminders'] == '1' && $A['enable_reminders'] == '1' && strtotime("now") < strtotime("-7 days", strtotime($A['date_start1']))) {
//form will not appear within 7 days of scheduled event.
change it to read as follows:
Text Formatted Code
//reminders must be enabled globally first and then per event in order to be active
//form will not appear within 1 days of scheduled event.
if ($S['enable_reminders'] == '1' && $A['enable_reminders'] == '1' && strtotime("now") < strtotime("-1 days", strtotime($A['date_start1']))) {
as I mentioned, this might become configurable later on.
Re: EVLIST Error
Posted on: 12/08/07 11:06pm
By: Anonymous (earnest)
If you specify a year, but not a month for the beyond date while setting an event to recur monthly, then you get a beyond date corresponding to the last month of the year you specified. otherwise, if no date is passed, then no date is stored.
I'd like you and/or someone to try this.
1. Create an event starting 2007, December 12th at 19:00. The event should end on 2007, December 12th at 21:00 (shouldn't these pulldown times reflect the time format chosen in the configuration?) - no split, no all day.
2. Make it recurring Monthly by day. Choose the second Wednesday of the month.
3. Do not specify the year and month beyond which this event will not recur.
4. Save the event.
5. Go to the event list. Do you see the event recurring? If not, then edit the event. I see that evlist has filled in the "Specify the year and month beyond which this event will not recur, if any" with "20007 December."
Do you or anyone else get this result?
Re: EVLIST Error
Posted on: 12/09/07 12:50am
By: machinari
Perfect! that's the description I needed. Here's how you fix it...
In event.php about line 1321 ish find the following:
Text Formatted Code
if (strtotime($intervalstop) > strtotime("2037-00-00")) {
$intervalstop = "2037-00-00";
}
}
$A['rec_data'] = COM_applyFilter($A['interval'],true) . ';' . COM_applyFilter($A['weekday'],true) . ';' . $intervalstop . '-00';
break;
and get rid of those last zero's so that it looks as follows:
Text Formatted Code
if (strtotime($intervalstop) > strtotime("2037-00-00")) {
$intervalstop = "2037-00-00";
}
}
$A['rec_data'] = COM_applyFilter($A['interval'],true) . ';' . COM_applyFilter($A['weekday'],true) . ';' . $intervalstop;
break;
you will also need to make one more slight change. In functions.inc, about line 1340, find the following:
Text Formatted Code
case 5:
//according to a particular interval per month
if (empty($rec_dataA[0]) || empty($rec_dataA[1])) {
break;
}
// return max 32 recurrences if necessary (= 18 months)
// 1 month = 2678400 seconds.
// 18 months = 48211200 seconds.
and insert the a line as follows:
Text Formatted Code
case 5:
//according to a particular interval per month
if (empty($rec_dataA[0]) || empty($rec_dataA[1])) {
break;
}
// return max 32 recurrences if necessary (= 18 months)
// 1 month = 2678400 seconds.
// 18 months = 48211200 seconds.
$startdate = strtotime("+1 month", $startdate); // so that the initial startdate is not repeated.
That fixed it for me. thanks for finding that bug and for your patience.
Re: EVLIST Error
Posted on: 12/09/07 02:39am
By: Anonymous (earnest)
Thank you! And thanks for YOUR patience. There is one other thing. I made the changes and then setup the event as I described. Looks quite nice, but the event recurred only until July 2009 instead of indefinitely (or for quite a while - at least). Do you happen to know why?
Re: EVLIST Error
Posted on: 12/09/07 02:40am
By: Anonymous (earnest)

I think I see why in the code
Re: EVLIST Error
Posted on: 12/09/07 02:45am
By: Anonymous (earnest)
Is it the 18 month limitation in functions.inc? Hmmm. That says it will produce a max of 32 iterations when my installation only produces 20. Maybe this is not the code that controls recurring # of times?
Re: EVLIST Error
Posted on: 12/09/07 02:48am
By: Anonymous (earnest)
So sorry. I see that it IS the limitation. The twenty repeats take place over 18 months! So increasing this number should extend the recurrences. right?
Re: EVLIST Error
Posted on: 12/09/07 03:22am
By: machinari
Quote by: earnestSo sorry. I see that it IS the limitation. The twenty repeats take place over 18 months! So increasing this number should extend the recurrences. right?
yes, the idea is to create recurrences in such a way that there is always an end date beyond which the event will not recur for sanity sake. Otherwise your page would never load cuz the function wouldn't stop spitting out events.
There are other ways to do what I've done I'm sure, and the numbers I've chosen are arbitrary. Feel free to alter them to suit your needs. Those numbers are set differently per recurrence type and you have 6 types (cases) to deal with in that code.
Re: EVLIST Error
Posted on: 12/09/07 05:07pm
By: Anonymous (earnest)
Thanks for your help. I discovered that the reason the evlist config links did not show up in my geeklog installation is because I was running the CVS version (localhost, only for testing to see what features are otw). For some reason, evlist config links do not show in GL CVS version.
*also, just btw, it seems the CVS version has a bug that does not permit spam-x's "Initial MT-Blacklist Import" to work. I tried it, and got a foreach failure.
Thanks again for your help. I am about to install this on my 1.4.1 site. Looking quite nice.
One enhancement you may wish to make is this: when a user signs up for notification, evlist tells him he will be notified. But he it permitted to signup again and again. Presumably he will be notified each time. Perhaps it may be useful to the user to get a listing of notifications with an icon associated with each to permit him to delete a notification. This will let the user manage his notifications, especially if he has forgotten whether he has signed up for an event. Obviously this will not be available to anon users.
Geeklog is great. Evlist makes it even better.
Thanks to everyone.
Re: EVLIST Error
Posted on: 12/09/07 05:21pm
By: Anonymous (earnest)
Just fyi.
It seems the issue with CVS is just that the config link does not include the "?mode=config." When I type the url manually, evlist works without apparent flaw.
Re: EVLIST Error
Posted on: 12/09/07 05:53pm
By: machinari
gl 1.5 includes changes to the admin list handling so yeah, you'll miss out on some stuff there. I plan to accommodate those changes once gl 1.5 is released--I certainly won't have time before that. I'll probably just not make use of anything provided by gl on that page and let evList build the admin page...
Re: EVLIST Error
Posted on: 12/13/07 10:55am
By: Anonymous (earnest)
Hi mach:
I'm getting the error below when anonymous users submit an event to the submissions queue. The event makes it to the queue apparently, but not before crashing the site with a SQL error. The logs say this:
12/12/07 17:55:54 - 1136: Column count doesn't match value count at row 1. SQL in question: INSERT IGNORE INTO gl_evlist_lookup VALUES ( '20071212175554735','2' )
Might you know what is going on?
-E
Re: EVLIST Error
Posted on: 12/13/07 11:53am
By: machinari
yes, i do actually. Good find.
the lookup table contains 3 columns and the query that is causing your error is submitting only two.
find the following in event.php about line 1582:
Text Formatted Code
foreach ($A['category'] AS $key => $cat_id) {
$cat_id = COM_applyFilter($cat_id);
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
and change it to look like this:
Text Formatted Code
foreach ($A['category'] AS $key => $cat_id) {
$cat_id = COM_applyFilter($cat_id);
$cat_status = '1';
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
note there are
three changes to make.
that should do it. sorry for the hassle
Re: EVLIST Error
Posted on: 12/13/07 12:25pm
By: Anonymous (earnest)
No hassle at all.
Still get this error:
Thu 13 Dec 2007 12:13:08 EST - 1136: Column count doesn't match value count at row 1. SQL in question: INSERT IGNORE INTO gl_evlist_lookup VALUES ( '20071213121308266','2' )
I suppose I should look through the code and think. Up till now, I have just been mindlessly cutting and pasting because I want to quickly iron out any issues that may exist. Here is the entire "if statement" as I think you intended:
Text Formatted Code
if ($cat_count >= 1) {
$i = 1;
$cat_values = '';
foreach ($A['category'] AS $key => $cat_id) {
$cat_id = COM_applyFilter($cat_id);
if (!empty($cat_id)) {
if (!is_numeric($cat_id) && $_USER['uid'] > 1) {
//anon user cannot add new categories,
//but logged in members may and for now they are not moderated.
$cat_status = '1';
//insert new category
DB_query("INSERT INTO {$_TABLES['evlist_categories']} SET name = '$cat_id', status = '0'");
//$newcid = DB_insertID();
$newcid = DB_getItem($_TABLES['evlist_categories'], 'id', "name='$cat_id'");
if (!empty($newcid)) {
$cat_values .= "('{$A['eid']}','$newcid','$cat_status')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
} else {
$cat_values .= "('{$A['eid']}','$cat_id')";
if ($i < $cat_count) {
$cat_values .= ',';
}
}
}
$i++;
}
//save category info
if (!empty($cat_values)) {
//inserting categories for a new event
DB_query("INSERT IGNORE INTO {$_TABLES['evlist_lookup']} VALUES " . $cat_values);
}
}
if (isset ($_CONF['notification']) && (in_array ('evlist', $_CONF['notification'])
|| in_array('evList', $_CONF['notification']) || in_array('event', $_CONF['notification']))) {
evlist_sendNotification ($A);
}
COM_updateSpeedlimit('event');
$retval .= COM_refresh ($_CONF['site_url'] . '/evlist/index.php?msg=9');
}
Re: EVLIST Error
Posted on: 12/13/07 12:27pm
By: Anonymous (earnest)
Hmmm...
Did you edit the post????
LOL
Hold off for a sec. I will try again.
-E
Re: EVLIST Error
Posted on: 12/13/07 12:48pm
By: Anonymous (earnest)
Worked!
Thanks!
Re: EVLIST Error
Posted on: 12/13/07 01:50pm
By: machinari
yes, i did edit the post. i tried to do it quickly.
guess it wasn't quick enough. :wink:
Re: EVLIST Error
Posted on: 12/31/07 09:45pm
By: tt0ne
This is the weirdest thing ever:
I just installed the plugin - couldn't wait to try it. It installed - no problems.
I try to add an event here is the error:
Text Formatted Code
Mon 31 Dec 2007 15:51:31 PST - 1064: You have an error in your SQL syntax near 'LIKE gl_evlist_events)' at line 2. SQL in question: CREATE TEMPORARY TABLE evlist_temp_events^M
(LIKE gl_evlist_events)
Mon 31 Dec 2007 18:18:45 PST - 1064: You have an error in your SQL syntax near '' at line 1. SQL in question: SELECT anonview FROM
Mon 31 Dec 2007 18:38:10 PST - 1064: You have an error in your SQL syntax near 'SELECT date_format FROM gl_evlist_settings)' at line 1. SQL in question: SELECT format FROM gl_evlist_dateformat WHERE id = (SELECT date_format FROM gl_evlist_settings)
Mon 31 Dec 2007 18:38:13 PST - Error, invalid username: 'Ambrose'
Who is Ambrose? Certainly no username we use THAT IS FOR SURE.
Thanks in advance,
- Marco
Re: EVLIST Error
Posted on: 12/31/07 11:32pm
By: machinari
After the initial error, the rest doesn't really make a difference.
The "ambrose" username is what somebody used while trying to log into your site and they were rejected and logged. Notice the time of the entry. No biggy there.
The initial error, the evList error, has something to do with that "^M" -- I have no idea what that is. Maybe a line break or something... It's not in my code.
Ensure that your database user has "create temporary table" permission and maybe that'll fix it--doubtful.
Re: EVLIST Error
Posted on: 12/31/07 11:41pm
By: machinari
I guess you could try to get rid of the parenthesis surrounding the LIKE statement. You can find that query in functions.inc near the end of the evlist_makeRecurrences function. In my file it's about line 1496.
If that's the problem tho, you're going to encounter it again. If it is the problem, then perhaps it's a MySQL version issue.
Re: EVLIST Error
Posted on: 01/01/08 01:04am
By: tt0ne
We are using version 3.23.58 with certain RedHat enhancements... I realize it is an old version but it is maintained and secured still by Redhat. You think there is a syntax problem and I agree with you because obviously other people aren't experiencing this problem. I may upgrade mysql via source - who knows - but I'm disappointed we can't use this plugin without upgrading since I doubt there is anything that it does that requires features from a newer version of MySQL... The user does have "create" privileges so that isn't the problem.
Thank you for creating this plugin - if I upgrade MySQL I'll report if that was the problem (almost certainly - although your plugin is the first to require an upgrade).
Warmly,
- Marco
Re: EVLIST Error
Posted on: 01/01/08 01:18am
By: machinari
um, yeah. it does do things (syntax wise) that you cant do in 3.23. Your issue is an example of that... in fact, i think i mentioned earlier that 4.1something is minimum.. can't remember now tho. I have no intention of writing for 3.23 anymore. I've installed 5.x and if it works on that, then I'm happy.
Re: EVLIST Error
Posted on: 01/01/08 02:24am
By: tt0ne
Understood. Like I said, I realize I'm using an old version and you always take a chance of something not working when you haven't upgraded. Maybe you've done me a favor and forced me to finally get around to doing just that- upgrade.
Hopefully I won't run into massive dependency problems. :-)
- Marco
Re: EVLIST Error
Posted on: 01/01/08 04:00am
By: tt0ne
Well, I took the fast route, bro - and I simply imported our database into an upgraded mysql server on one of our other machines - and now your plugin works flawlessly. Turns out that having the database on a second machine has also sped up our page rendering time by almost half! I wouldn't have thought a 50% speed increase in page rendering would have happened - but I'm not complaining :-)
Thanks!
- Marco
Re: EVLIST Error
Posted on: 01/01/08 10:25pm
By: tt0ne
Where can I make a donation on behalf of our organization?
- Marco
Re: EVLIST Error
Posted on: 01/01/08 10:48pm
By: machinari
I dunno about "our" organization, but there's a paypal button on
this page[*2] 8)
Re: EVLIST Error
Posted on: 01/01/08 11:34pm
By: tt0ne
Thanks man - I just made a donation.
- Marco