Support forumCategory: BugsReservations view hangs if Worker or Service assigned no longer exist
rszewczyk asked 6 months ago

Reservation view in …/wp-admin/admin.php?page=easy_app_top_level does not render if any of Worker or Service no longer exist.
Steps to reproduce
When service or worker is removed from the system. It’s id from SQL wp_ea_staff or `wp_ea_services` remains in wp_ea_appointments table in columns service and worker.
In such case, Reservations view cannot load with prompt “Loading data…”.
Proposal of fix
In case of non-existing entity in view or any other failed JOIN to use default labels of “REMOVED” or “UNKNOWN”.
Another way to prevent this would be to disallow deletion of entities and just mark them as deleted in additional status column.