bat_fullcalendar_timeline.js?v=10.1.6:251 Uncaught TypeError: Cannot set properties of undefined (setting 'url')

Created on 27 November 2023, 12 months ago
Updated 3 April 2024, 8 months ago

When is fullcalendar view (something like /admin/bat/calendar/7/availability_hourly) you click for second time in and booking you get this error:

bat_fullcalendar_timeline.js?v=10.1.6:251 Uncaught TypeError: Cannot set properties of undefined (setting 'url')
at Drupal.batCalendar.Modal (bat_fullcalendar_timeline.js?v=10.1.6:251:33)
at HTMLAnchorElement.eventClick (bat_fullcalendar_timeline.js?v=10.1.6:112:36)
at t.publiclyTrigger (fullcalendar.min.js:10:21677)
at e.publiclyTrigger (fullcalendar.min.js:10:13091)
at e.handleClick (fullcalendar.min.js:9:3619)
at HTMLAnchorElement. (fullcalendar.min.js:7:16227)
at HTMLDivElement.dispatch (jquery.min.js?v=3.7.0:2:39997)
at v.handle (jquery.min.js?v=3.7.0:2:37968)

The error is triggered by this code:

    if (ajax == undefined) {
      ajax = new Drupal.Ajax(element_settings.url, calendars_table, element_settings);
    }
    else {
      ajax.url = url;
      ajax.options.url = url + '?' + Drupal.ajax.WRAPPER_FORMAT + '=drupal_ajax';
      ajax.element_settings.url = url;
    }

Because ajax.element_settings.url is no set. Removing this line make this works again.

🐛 Bug report
Status

Closed: outdated

Version

2.1

Component

Code

Created by

🇪🇸Spain Carlitus

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024