URGENT HELP NEEDED - calendar of main doctor

mwestrik wrote on Thursday, January 05, 2012:

Hi,

I need urgent help. All of a sudden, the most frequently used calendar is down, only shows a 500.shtml page.

What happened? Somebody tried to reschedule one instance of a recurring event (lunch hour) in order to be able to reschedule another event to that hour. The system then “hang up” so she reentered and rescheduled the second event to the time of the recurring event. From that moment on, the calendar cannot be opened anymore - but only for that doctor. all other calendars work just fine.

I tried fixing this by removing the recurring event as well as the rescheduled event directly from the database in the tables openemr_postcalendar_categories (lunch) and openemr_postcalendar_events (patient appointment), but I still cannot access the calendar.

The hostings control panel php log states    File does not exist: /home/clinical/public_html/500.shtml, referer: http://www.clinicalaalegria.es/interface/main/calendar/index.php?module=PostCalendar&viewtype=day&func=view&&pc_username=nhendriks&framewidth=1156

and the log file in /interface/main/calendar does only say:

PHP Warning:  in_array() : Wrong datatype for second argument in /home/clinical/public_html/interface/main/calendar/add_edit_event.php on line 1241

Does anyone have an idea what happened, and, most important, how to fix this?

juggernautsei wrote on Thursday, January 05, 2012:

Hi,

i have a dumb question. Have you tried to restore from backup?
That is the fastest way to fix this issue.

mwestrik wrote on Thursday, January 05, 2012:

That would imply losing all data created since the last backup, so unfortunately that is not an issue.

yehster wrote on Thursday, January 05, 2012:

If the problem is indeed because of errant data and you can’t simply go back to a backup, I suggest that you create a mysql dump of openemr_postcalendar_events to save that table’s current information, then delete all the entries in o_p_e and see if that restores functionality.  That would give you a diagnosis at least.

juggernautsei wrote on Thursday, January 05, 2012:

I was not implying that you loose data but combine what yehester is saying with a restore. The first order is of business is to restore the calendars functionality. That is what the dump and the retore would do. Then sort through the data. Restoring the entries that where not restored from the backup. I have gone through something like this myself. It took about 3 hours to restore the missing data.

Sherwin

mwestrik wrote on Sunday, January 08, 2012:

Hi,

I’ve fixed in in a probably unconventional way: I just added another user, and in the database table openemr_postcalendar_events I just changed the aid_id from the old user id into the new one. At least, for now, for the upcoming events.

My question now is: as soon as I’ve changed all events from the old user to the new, I would like to delete the old user / doctor, simply because clicking that name in the list of calendars will cause the calendar application to gang until a restart of the total app. However, I do understand that other tables use the user ID as well. Problem is, that those variable names are not always the same. Can anyone help me identifying which columns in which tables to change?

mwestrik wrote on Sunday, January 08, 2012:

Or is it possible to just disable the calendar, so that all other info will stay available?