Our pure JavaScript Scheduler component


Post by andrew.perera »

Hi Team,
As you might already be aware we use the two scheduler view and React as the front-end development library.
We have upgraded Bryntum from 5.0.1 to 5.2.2 and ever since we get TypeError: Cannot read properties of null (reading 'hasLinks') when moving the first event from the top grid to the bottom grid.

Here are the steps.

  1. Drag and drop an event from the top grid to the bottom grid (No events in the bottom grid)
    start.png
    start.png (59.96 KiB) Viewed 483 times
  2. The whole scheduler goes to frozen mode. the event is not visible anymore where you dropped. Unless you do a full refresh the screen will remain the same.
    freeze.png
    freeze.png (54.73 KiB) Viewed 483 times
  3. Check the console and found the error as follows
    consoleerror.png
    consoleerror.png (48.39 KiB) Viewed 483 times
  4. I debugged the code in both 5.0.1 & 5.2.2 using the scheduler.umd.js

As you can see our scheduler worked fine when the version was 5.0.1. Please provide your assistance.


Post by andrew.perera »

Please find the debugged Bryntum code

5.0.1code.png
5.0.1code.png (48.48 KiB) Viewed 481 times
5.2.2code.png
5.2.2code.png (44.34 KiB) Viewed 481 times

Post by alex.l »

Hi andrew.perera,

Thanks for the screenshots. Looks like resource is not exists in the assignment model instance.
It's hard to say what exactly happened here without a test case.
Please attach a runnable code here with data example and steps to reproduce this problem.

All the best,
Alex


Post by netten.mehra »

Hey
I had the same issue after updating from v4 to v5. I it by passing the event/eventAssignment information only to the scheduler as soon as the resources have loaded.

After the resources array is filled, I also pass the events. Maybe this could help. It worked before in v4 and only emerged after my v5 migration. Hope this helps


Post by alex.l »

Did you follow instructions in our Upgrade guides one by one for all versions via 4.x and 5.x? https://bryntum.com/products/schedulerpro/docs/api/guides-upgrading

All the best,
Alex


Post by andrew.perera »

Hi Alex, Thanks for your response.

I think it is reproducible in your code

  1. Pass an empty array for events for Scheduler 2 instance - This represents the bottom scheduler without any event
    emptyarray.png
    emptyarray.png (70.06 KiB) Viewed 446 times
    schedulernoevents.png
    schedulernoevents.png (97.71 KiB) Viewed 446 times

2 . Drag and drop the event from the top grid to the bottom grid and observe the console

errorproduced.png
errorproduced.png (165.12 KiB) Viewed 446 times
  1. App freezes and if you move the mouse cursor on top timelines and scrolling will move fast weirdly.

Cheers.


Post by jasony »

Hey folks,

We've also been running into this issue lately. It looks like you have a working reproduction of the problem but if its any help it looks like this was introduced somewhere between version 5.0.6 and 5.2.0.

Thanks!


Post by alex.l »

Hi andrew.perera,

Thank you for clear instructions! I've reproduced that and confirmed a bug. Here is a ticket to track the status: https://github.com/bryntum/support/issues/6094

@jasony thank for your information!

All the best,
Alex


Post Reply