Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 04:10 pm EDT

Geeklog Forums

EVLIST Error

Page navigation


earnest

Anonymous
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:
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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.
 Quote

earnest

Anonymous
cheerful
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.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
there is an option to change your time format from the evlist admin panel.
 Quote

earnest

Anonymous
awake
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?

 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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.
 Quote

earnest

Anonymous
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?
 Quote

earnest

Anonymous
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?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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 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.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by: earnest

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).

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.
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by: earnest

Email 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.
 Quote

earnest

Anonymous
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?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
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.
 Quote

earnest

Anonymous
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?
 Quote

earnest

Anonymous
Oops! I think I see why in the code Oops!
 Quote

earnest

Anonymous
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?
 Quote

earnest

Anonymous
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?
 Quote

Status: Banned

machinari

Forum User
Full Member
Registered: 03/22/04
Posts: 1512
Quote by: 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?

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.
 Quote

earnest

Anonymous
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.
 Quote

earnest

Anonymous
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.
 Quote

Page navigation

All times are EDT. The time is now 04:10 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content