Menu

#491 Fatal error: unfortunately the database is not available at the moment.

Major
closed
nobody
None
1
2020-10-29
2020-10-19
KLN
No

An error occurred when using an LDAP user (level 2) to make a booking. Is it a system error or a configuration error?

Uncaught exception 'MRBS\\DBException' in /var/www/html/mrbs/lib/MRBS/DB.php at line 109
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'create_by' cannot be null
SQL: INSERT INTO mrbs_entry (`start_time`, `end_time`, `entry_type`, `repeat_id`, `room_id`, `create_by`, `modified_by`, `name`, `type`, `description`, `status`, `ical_uid`, `ical_sequence`, `ical_recur_id`, `enable_registrant_limit`, `registrant_limit`) 
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Params: Array
(
    [0] => 1602997200
    [1] => 1603000800
    [2] => 0
    [3] => 
    [4] => 2
    [5] => 
    [6] => 
    [7] => test
    [8] => I
    [9] => 
    [10] => 0
    [11] => MRBS-5f8cf0630c505-f4588883@mrbs
    [12] => 0
    [13] => 
    [14] => 1
    [15] => 1
    )

    #0 /var/www/html/mrbs/mrbs_sql.inc(988): MRBS\\DB->command('INSERT INTO mrb...', Array)
    #1 /var/www/html/mrbs/mrbs_sql.inc(1017): MRBS\\mrbsCreateEntry('mrbs_entry', Array)
    #2 /var/www/html/mrbs/mrbs_sql.inc(2457): MRBS\\mrbsCreateSingleEntry(Array)
    #3 /var/www/html/mrbs/edit_entry_handler.php(765): MRBS\\mrbsMakeBookings(Array, NULL, false, NULL, NULL, true, 'series')
    #4 {main}

    MRBS GET: Array
    (
    )
    MRBS POST: Array
    (
    [csrf_token] => 61985d88094b72b980d662f6e92e169682f7603e485708749e86c733148dd8c6
    [returl] => http://mrbs/mrbs/index.php?view=day&page_date=2020-10-18&area=1&room=2
    [rep_id] => 0
    [edit_type] => series
    [name] => test
    [description] => 
    [start_date] => 2020-10-18
    [start_seconds] => 46800
    [end_date] => 2020-10-18
    [end_seconds] => 50400
    [rooms] => Array
    (
    [0] => 2
    )

    [type] => I
    [enable_registrant_limit] => on
    [registrant_limit] => 1
    [rep_type] => 0
    [rep_day] => Array
    (
    [0] => 0
    )

    [month_type] => 0
    [month_absolute] => 18
    [month_relative_ord] => 3
    [month_relative_day] => SU
    [rep_interval] => 1
    [rep_end_date] => 2020-10-18
    )
    MRBS SESSION: Array
    (
    [csrf_token] => 61985d88094b72b980d662f6e92e169682f7603e485708749e86c733148dd8c6
    [user] => MRBS\\User Object
    (
    [username] => admin
    [display_name] => Admin
    [email] => admin@localhost
    [level] => 2
    )

    )

    , referer: http://mrbs/mrbs/edit_entry.php?view=day&year=2020&month=10&day=18&area=1&room=2&hour=13&minute=0

Discussion

  • Campbell Morrison

    I think this may be caused by the same bug that caused this problem. If you are running MRBS 1.9.1 or 1.9.2 can you try using the attached version of lib/MRBS/Auth/AuthLdap.php and see if it fixes the problem?

     
    👍
    1
  • KLN

    KLN - 2020-10-19

    Yes, just tried to overwrite the file and solved the problem, thanks very much.

     
  • Campbell Morrison

    I've added a further change in bc5b63 which improves the resiience of the code. (It's not necessary to install this patch if you've already got the patch to AuthLdap.php above).

     
  • Campbell Morrison

    • status: open --> closed
     
MongoDB Logo MongoDB