Skip to content

Resources and rooms overview crash when selecting a date slot #8520

@smarinier

Description

@smarinier

Steps to reproduce

1.Create a Room (With a room creating tool like CalendarResourceManagement or RoomVox)
2.Create an event in your Calendar
3.Select "Show all Rooms"
4.Select "Check room availability"
5.Click on your schedule time

-> see browser console logs

Image

Expected behavior

What i would like is to have my room information stored in my event.

Actual behavior

Crash in JS

Calendar app version

6.5.0

CalDAV-clients used

No response

Browser

Firefox 151

Client operating system

MacOS

Server operating system

Linux

Web server

Apache

Database engine version

MariaDB

PHP engine version

PHP 8.3

Nextcloud version

33 and 34

Updated from an older installed version or fresh install

None

List of activated apps

- activity: 7.0.0
  - announcementcenter: 7.4.1
  - appstore: 1.0.0
  - bbb: 2.9.1
  - bruteforcesettings: 7.0.0
  - calendar: 6.5.0
  - calendar_resource_management: 0.13.0-dev.1
  - cloud_federation_api: 1.18.0
  - comments: 1.24.0
  - contacts: 8.7.0
  - dav: 1.39.0
  - deck: 1.18.1
  - federatedfilesharing: 1.24.0
  - federation: 1.24.0
  - files: 2.6.0
  - files_pdfviewer: 7.0.0-dev.0
  - files_sharing: 1.26.0
  - files_trashbin: 1.24.0
  - files_versions: 1.27.0
  - firstrunwizard: 7.0.0-dev.0
  - logreader: 7.0.0
  - lookup_server_connector: 1.22.0
  - oauth2: 1.22.0
  - ownershiptransfer: 1.4.0
  - password_policy: 6.0.0-dev.0
  - privacy: 6.0.0-dev.1
  - profile: 1.3.0
  - provisioning_api: 1.24.0
  - related_resources: 5.0.0-dev.0
  - roomvox: 1.1.2
  - serverinfo: 6.0.0
  - settings: 1.17.0
  - sharebymail: 1.24.0
  - spreed: 24.0.0
  - systemtags: 1.24.0
  - text: 8.0.0
  - theming: 2.9.0
  - twofactor_backupcodes: 1.23.0
  - user_profile: 0.1.0
  - user_status: 1.14.0
  - viewer: 7.0.0-dev.0
  - weather_status: 1.14.0
  - workflowengine: 2.16.0

Nextcloud configuration


Web server error log


Log file


Browser log

Uncaught TypeError: handler.apply is not a function
    trigger internal-common.js:3679
    node_modules calendar-main.js:184178
    trigger internal-common.js:3679
    node_modules calendar-main.js:184028
    trigger internal-common.js:3679
    stopDrag index.js:825
    done index.js:327
    setTimeout handler*stop index.js:338
    tryStopDrag index.js:821
    node_modules calendar-main.js:183840
    trigger internal-common.js:3679
    node_modules calendar-main.js:183134
    node_modules calendar-main.js:183123
    PointerDragging index.js:119
    FeaturefulElementDragging index.js:770
    DateClicking index.js:1105
    node_modules calendar-main.js:173968
    node_modules calendar-main.js:173968
    node_modules calendar-main.js:186336
    Preact 23
internal-common.js:3679:1
    trigger internal-common.js:3679
    handleDragEnd index.js:1100
    trigger internal-common.js:3679
    handleDragEnd index.js:950
    trigger internal-common.js:3679
    stopDrag index.js:825
    done index.js:327
    (Asynchrone : setTimeout handler)
    stop index.js:338
    tryStopDrag index.js:821
    onPointerUp index.js:762
    trigger internal-common.js:3679
    handleMouseUp index.js:56
    (Asynchrone : EventListener.handleEvent)
    handleMouseDown index.js:45
    (Asynchrone : EventListener.handleEvent)
    PointerDragging index.js:119
    FeaturefulElementDragging index.js:770
    DateClicking index.js:1105
    interactions index.js:1935
    map self-hosted:163
    registerInteractiveComponent index.js:1935
    handleEl internal.js:367
    Preact 23

Additional info

in calendar/src/components/Editor/FreeBusy/RoomAvailabilityModal.vue:

Theres a fullcalendar view initiated with options()

These options generate two errors:

  1.  		selectable: true,
     		select: this.handleSelect,
    

But this.handleSelect is not defined in methods(). So this is undefined (that's why handler.apply is crashing)

Adding in methods
handleSelect() {
console.log('handleSelect')
}

Solves the crash, but doesn't select the schedule time ;)

  1. option: dateClick: this.findFreeSlots(),

The trigger won't be able to handler.apply on the return from this function, wich is a promise.

You should either use:
dateClick: () => this.findFreeSlots(),
Or (without parenthesis)
dateClick: this.findFreeSlots,

But when doing this, nothing really happens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions