|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Event Error
I am running a local MySQL, latest version and PHP too, and PWS on Win2000 Pro. Installed Calendar v. 4.1.1 ok, without moving any files, all in folder calendar411/, created category ok, but getting this error in adding event:
Notice: Undefined offset: 1 in E:SitesSpectrumLoanCodevhtmlcalendar411privateltwe ventmgr.php on line 620 Notice: Undefined offset: 1 in E:SitesSpectrumLoanCodevhtmlcalendar411privateltwe ventmgr.php on line 632 Warning: Cannot modify header information - headers already sent by (output started at E:SitesSpectrumLoanCodevhtmlcalendar411privateltwe ventmgr.php:620) in E:SitesSpectrumLoanCodevhtmlcalendar411privateltwe ventmgr.php on line 257 Warning: Cannot modify header information - headers already sent by (output started at E:SitesSpectrumLoanCodevhtmlcalendar411privateltwe ventmgr.php:620) in E:SitesSpectrumLoanCodevhtmlcalendar411privateltwe ventmgr.php on line 258 I can still create an event anyway, but I was editing one and made it recurring, but the recurrence does not show on the calendar. What's it all about? |
|
#2
|
|||
|
|||
|
RE: Event Error
The function Event2_POST is called during an event ADD to convert the config parameters
'start_time' & 'end_time' to $_POST[] entries so they can be displayed(). Check those settings in the config file. They are either commented out, or follow an incorrect format. To not display default times, they must be set = 0, not commented out. Something on my list for next release is to make sure all "optional" config parameters can be left "undefined" in the config file. |
|
#3
|
|||
|
|||
|
RE: Event Error
Thanks for the reply, but the config file does not have those items commented out, I did no change to the original file.
When I add an event, both time slots are at 1:00 AM, and when I edit an event they are at 1:30 PM whatever the time was set to originally. I love the calendar though. Hope I can resolve these issues to make it even better. Thanks again. |
|
#4
|
|||
|
|||
|
RE: Event Error
Please make the following changes in ltweventmgr.php and let me know if it helps.
line 610: Old: tmpA = split(":",$this->event->start_time); New: tmpA = explode(":",$this->event->start_time); line 622: Old: $tmpA = split(":",$this->event->end_time); New: $tmpA = explode(":",$this->event->end_time); The split function expects a Perl regex as arg one, but I'm passing a string which explode uses(like in lines 600 & 605). |
|
#5
|
|||
|
|||
|
RE: Event Error
I got the same problem :
Notice: Undefined offset: 1 in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 620 Notice: Undefined offset: 1 in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 632 Warning: Cannot modify header information - headers already sent by (output started at c:inetpubwwwrootCalendarprivateltweventmgr.php:620 ) in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 257 Warning: Cannot modify header information - headers already sent by (output started at c:inetpubwwwrootCalendarprivateltweventmgr.php:620 ) in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 258 After I change the code in line 610 and 622. I get this message: Notice: Undefined offset: 1 in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 620 Notice: Undefined offset: 1 in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 632 Warning: Cannot modify header information - headers already sent by (output started at c:inetpubwwwrootCalendarprivateltweventmgr.php:620 ) in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 257 Warning: Cannot modify header information - headers already sent by (output started at c:inetpubwwwrootCalendarprivateltweventmgr.php:620 ) in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 258 |
|
#6
|
|||
|
|||
|
RE: Event Error
Do this and let me know what it returns.
Under line 610, add a line: echo "tst=".$this->event->start_time Under line 622, add a line: echo "tst=".$this->event->end_time Note, I do not need the rest of the text that starts with: Warning: Cannot modify header information - headers already sent by (output started at....... Also. When you add the event, did the correct time get put in the database?? |
|
#7
|
|||
|
|||
|
RE: Event Error
Here is what I get after changing the code: ( I put ";" to your echo lines because I think you forgot to have it)
tst= Notice: Undefined offset: 1 in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 622 tst= Notice: Undefined offset: 1 in c:inetpubwwwrootCalendarprivateltweventmgr.php on line 636 Yes, the time is correct when I put a event to database. |
|
#8
|
|||
|
|||
|
RE: Event Error
The error looks to be because I'm not checking that there is actually something in the event start_time and stop_time.
Change the code between lines 610 and 632 so it looks like this. You are adding two if clauses. if ( !empty($this->event->start_time) ){ //NEW! $tmpA = split(":",$this->event->start_time); if ( $this->hrs_per_day == 12 ){ if ( $tmpA[0] < 12 ){ $_POST['sAMPM'] = 'AM'; }else{ $_POST['sAMPM'] = 'PM'; $tmpA[0] = $tmpA[0] - 12; } } $_POST['sHour'] = $tmpA[0]; $_POST['sMin'] = $tmpA[1]; } //NEW! if ( !empty($this->event->end_time) ){ //NEW! $tmpA = split(":",$this->event->end_time); if ( $this->hrs_per_day == 12 ){ if ( $tmpA[0] < 12 ){ $_POST['eAMPM'] = 'AM'; }else{ $_POST['eAMPM'] = 'PM'; $tmpA[0] = $tmpA[0] - 12; } } $_POST['eHour'] = $tmpA[0]; $_POST['eMin'] = $tmpA[1]; } //NEW! I generally run with default start & end times defined, but I thought I'd done without for a while. Once I get the P/S back in my development PC, I can try to reproduce this to be sure, but that probably won't be until the weekend. |
|
#9
|
|||
|
|||
|
RE: Event Error
Thanks !
It runs smooth now I'm very appreciated |
|
#10
|
|||
|
|||
|
RE: Event Error
I'll add this as a bug fix in the next release.
|
|
#11
|
|||
|
|||
|
RE: Event Error
I made the changes as suggested and most problems are fixed: there are no more errors, and the time of an event is remembered.
However... I made an event "recurring every Friday" but it only shows it on the first Friday, although when clicked on, the event lists it as a recurring every Friday event. Why does it not show on the calendar every Friday? |
|
#12
|
|||
|
|||
|
RE: Event Error
What is the "End Date"?
Recurring events stop after the "End Date" is reached, and by default on a new event, the "End Date" is set the same as the "Start Date". From ltw_readme.txt... 3) End dates for recurring events are now implemented. The "End Date" applies to recurring events. The event will recur until the date exceeds the 'event end' date. |
|
#13
|
|||
|
|||
|
RE: Event Error
Sorry, I read it just before I read your post, looking for the answer myself... dah! It is beautiful! marvelous! thank you, thank you, thank you!
|
![]() |
| Viewing: Codewalkers Forums > Projects > ltwCalendar > Event Error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|