Availibilty error

  • rmendoza

    I'm getting the error: Availability Problem: Not all of the selected date and time slots are available for booking. Please check the conflicting date and time slots, make the necessary changes to your booking form and try again.

    This happens every time I attempt to book a date and time. There is no data in the schedule or event tables.  I believe the it was a proper install, I'm not sure why this message comes up. Any assistance would be appreciated.

    • VIP member
      VIP member

      Look at add_event.php

      There's these lines:
      line 140:  //echo "Scheduled Slots: ".$scheduled_slots."<br />";
      line 145:  //echo "Availability Count: ".$availability_count."<br />";

      If you temporarily remove those // from the beginning of the line, you should see something related to your problem. As you see, the next lines compare those values, and if scheduled_slots is bigger than availability_count you have the error message displayed.

      if ($scheduled_slots > $availability_count) {
                              $page_error_message = 'Availability Problem:   ......

      • rmendoza

        Yes, thanks...my availability is 0. Where do I effect the availability? Can't figure out how the availability is recorded . I appreciate the help. 

    • Jonas Ekenberg
      Jonas Ekenberg

      I found the problem.It doesnt work when the system tries to create the date time schedule data for the specified year and month.
      The sql notation is wrong, it misses a whitespace.

      Open booking_db_fns.php, on line 32 the insert-question starts.

      Change the string from row 33 with this:

      SET schedule_date_time = '" . $year . "-" . $month . "-" . sprintf("%02d",$i)." ". $valid_time . "', day_of_the_week_id = " . $dayoftheweekid );

      The problem was the whitespace between day and time ( sprintf("%02d",$i)." ". $valid_time ).

      Then you also have to change the value of last_mod_by_id to an int not as in the script a string.
      Otherwise you cant save an event.

      row 616     should be last_mod_by_id = 0,


  • depro

    hi .. I just have the same problem … and I did what you exactely said …. but it still shows the same message …

    also shows : ((
    Scheduled Slots: 1
    Availability Count:

    can you check again if you have some mistakes in what you wrote ??

  • depro

    please can you send me the same version that you have … thanks