LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Edit an event adds new event instead of editing selected event
Posted:  19 Dec 2011 17:36
I customized LuxCal on Windows XP and it was working quite nicely.  But I moved the code to Linux and I have now a strange error.  When I try to edit an event in the calendar and press the Save button, a new event is created instead of modifying the selected event.  It only occurs on IE 8 on Linux.  It functions normally when browsed with Firefox 8.  The event.php, eventform2.php and month.php are exactly the same between Windows and Linux.  Any ideas why I would get this behavior on Linux?
Posted:  20 Dec 2011 11:21
The problem occurs with a fresh installation of LuxCal on the Linux Server.
Posted:  20 Dec 2011 18:11
resolved the problem by rearranging rows 163 to 168 so the update and delete checks occur before the add:

    if     (isset($_POST['add_exe_cls'])) { $mode = 'add_exe'; $close = true; }
    elseif (isset($_POST['upd_exe'])) { $mode = 'upd_exe'; }   
    elseif (isset($_POST['upd_exe_cls'])) { $mode = 'upd_exe'; $close = true; }
    elseif (isset($_POST['del_exe_cls'])) { $mode = 'del_exe'; $close = true; }
    elseif (isset($_POST['del_exe'])) { $mode = 'del_exe'; }   
    elseif (isset($_POST['add_exe'])) { $mode = 'add_exe'; }
Posted:  23 Dec 2011 20:32
I added some debugging code into event.php so the actual line numbers I changed were lines 141 to 145 in event.php.  In what is posted above, the line numbers are shifted down because of the debugging code.