This is a migrated thread and some comments may be shown as answers.

IE11 - 'Unable to get property 'end' of undefined or null reference' error

14 Answers 263 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Taras
Top achievements
Rank 2
Taras asked on 20 Jul 2017, 11:53 AM

I'm using 2017.2.504 version of Kendo UI and I've got some number of errors from the server which are pointing to kendo's code. It happen's when user with next info:

 

"userAgent": "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; Touch; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; Tablet PC 2.0; InfoPath.3; rv:11.0) like Gecko", "userAgentInfo": { "browserName": "Internet Explorer", "browserVersion": "11.0", "engineName": "Trident", "engineVersion": "", "isBot": false, "isMobile": false, "os": "Windows 10", "platform": "Windows" }

 

navigates to page with kendo Scheduler control. This is the error message I've got and callstack:

MESSAGE Unable to get property 'end' of undefined or null reference

Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:85697:17 in timeSlotRanges
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87551:21 in _updateCurrentTimeMarker
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87529:17 in _currentTimeMarkerUpdater
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87585:21 in _currentTime
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:87526:17 in init
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:42:21 in Anonymous function
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97516:25 in _initializeView
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97484:17 in _renderView
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97452:21 in _selectView
Content/min/kendo_scripts_55F87EC54F85E0BE4E0E32C0B1BB88F0.js:97474:21 in view

 

Can you help to eliminate this errors?

 

Thanks,


14 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 21 Jul 2017, 09:09 PM
Are you in month views when this happens? In Month view and timeline month view, if you are have selectable set to true and are making any selection to highlight time slots, errors like this pop up because those views have no time slots to select.
0
Tyler
Top achievements
Rank 1
answered on 21 Jul 2017, 09:49 PM
Are you in month views when this happens? In Month view and timeline month view, if you are have selectable set to true and are making any selection to highlight time slots, errors like this pop up because those views have no time slots to select.
0
Veselin Tsvetanov
Telerik team
answered on 24 Jul 2017, 11:07 AM
Hello Taras,

May I ask you to prepare and send us an isolated runnable sample, that reproduces the reported error? You could use the Kendo Dojo and the Kendo Scheduler tasks service to create your sample. This way we will be able to troubleshoot the problem locally and to provide you with the most appropriate assistance for this case.

Looking forward to hearing from you.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Taras
Top achievements
Rank 2
answered on 26 Jul 2017, 12:34 PM

I'm not sure if it happens in month view because I'm getting those errors only from logs. 'selectable' is set to it's default (false). Also I have next code: 

        function onDataBinding (event) {
            var view = event.sender.view();
            view.times.hide();
            view.timesHeader.hide();
            return event;
        }

 

Which is hiding any time slots from scheduler.

0
Taras
Top achievements
Rank 2
answered on 26 Jul 2017, 12:40 PM

Hello Veselin Tsvetanov,

I can't provide isolated sample due to deep integration with angular controllers. I was no able to reproduce this error in any browser the only evidence of it I'm getting from server logs. I can provide a config settings of scheduler if it's needed.

0
Veselin Tsvetanov
Telerik team
answered on 28 Jul 2017, 09:37 AM
Hi Taras,

As far as I can understand, you could not reproduce the error while testing the application on your browser. The only trace of the problem is the available server log.

In this situation, providing the Scheduler configuration would help us to built a runnable sample that replicates your scenario. However, we will need to reproduce the error too, in order to be able to troubleshoot the case locally.

One more thing, that you could test would be IE 11 in Compatibility view mode (based on IE 7 and no longer supported by Kendo UI). Do you observe the error, when turning on the Compatibility view of your browser? 

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Taras
Top achievements
Rank 2
answered on 28 Jul 2017, 11:52 AM

Hello Veselin Tsvetanov,

I'm using IE11 on Windows 10, as well as the user from the error report. I don't see anything similar to compatibility mode there, what should I try to change there https://www.screencast.com/t/Bo1kfaEHsQ ? 

This is my code related to the scheduler:

<div id="calendar" class="calendar" kendo-custom-scheduler="schedulerWidget" k-options="calendarOptions"></div>

 

            var dataSource = getCalendarDataSource();
            $scope.calendarOptions = getCalendarOptions(dataSource);

 

        function getCalendarDataSource () {

            return new kendo.data.SchedulerDataSource({
                transport: { read: readData },
                schema: SCHEDULER_DATASOURCE_SCHEMA,
                serverFiltering: false
            });

        }

 

    var SCHEDULER_DATASOURCE_SCHEMA = {
        model: {
            id: "id",
            fields: {
                id: { from: "id" },
                title: { from: "title" },
                color: { from: "color" },
                start: { type: "date", from: "start" },
                end: { type: "date", from: "end" },
                description: { from: "description" },
                estWorkEfforts: { from: "estWorkEfforts" },
                isAllDay: { from: "isAllDay", type: "boolean", defaultValue: "true" },
                isOneDay: { from: "isOneDay", type: "boolean", defaultValue: "true" },
                itemType: { from: "itemType" },
                percentCompleted: { from: "percentCompleted" },
                resolution: { from: "resolution" },
            }
        }
    };

 

        function readData (options) {

            return options.success($scope.model.items);

        }

 

        function getCalendarOptions (dataSource) {

            return {

                mobile: false,
                footer: false,
                editable: false,
                views: [
                    { type: "workWeek", dateHeaderTemplate: $("#calendar-header-template").html(),  allDayEventTemplate: $("#event-template").html() },
                    { type: "week", dateHeaderTemplate: $("#calendar-header-template").html(), allDayEventTemplate: $("#event-template").html() },
                    { type: "kendo.ui.CustomMonthView", title: "Month", selected: true, eventHeight: 18, eventTemplate: $("#event-template").html() }
                ],
                dataSource: dataSource,
                navigate: onSchedulerNavigate,
                dataBinding: onDataBinding,
                dataBound: onDataBound

            };

        }

 

        function onSchedulerNavigate (event) {

            var view = event.sender.view();

            if (view.name !== 'month') {

                updateDateDisplay(view);

            }

            $scope.$broadcast('scheduleChanged');

        }

 

        function onDataBinding (event) {

            var view = event.sender.view();

            view.times.hide();
            view.timesHeader.hide();

            return event;

        }

 

        function onDataBound (e) {

            if (e.sender.viewName() == "week" || e.sender.viewName() == "workWeek") {
                $("#calendar > table > tbody > tr:nth-child(2) > td:nth-child(2) > div.k-scheduler-content").height(1);
            }

            if (e.sender.viewName() == "month" && $("span.tt-today").length == 0) {
                $("td.k-today").prepend('<span class="tt-today">' + commonRes.Today + '</span>');
            }

        }

 

Let me know if anything else can help.

Thanks!

0
Veselin Tsvetanov
Telerik team
answered on 01 Aug 2017, 08:16 AM
Hi Taras,

Thank you for the additional details provided. Based on that I have created the following Dojo sample. Unfortunately, I was not able to observe the error reported.

Two things, that may (or may not) be causing the problem observed. The used directive for the Scheduler widget is a custom one (kendo-custom-scheduler), and the selected view by default is also a custom one (CustomMonthView). As the error is observed in the view() function, the custom view could be causing that. 

What I could suggest you to do is to modify the sample sent, so it uses the custom view and the custom Scheduler directive. Also, try to test this sample with data, that is likely to be returned to users.

Concerning the IE11 compatibility view, I have tested such scenario, but the Angular app does not get initialized at all. Therefore, I don't think this could be the cause for the issue discussed.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Taras
Top achievements
Rank 2
answered on 04 Aug 2017, 11:43 AM

Hello Veselin Tsvetanov,

This is a sample with CustomMonthView and kendo-custom-scheduler http://dojo.telerik.com/OLekO/6 , wasn't able to reproduce that error as well. Maybe there is a way to make this error more informative? Btw, CustomMonthView was implemented by Chavdar Angelov from Telerik team.

 

Thanks!

0
Veselin Tsvetanov
Telerik team
answered on 08 Aug 2017, 06:12 AM
Hello Taras,

Thank you for the sample prepared and for the further clarification provided. Unfortunately, I was not able to reproduce the reported error as well. Also, I do not think, that we could extract more information from the error stack trace.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Taras
Top achievements
Rank 2
answered on 08 Aug 2017, 07:31 AM

Hello Veselin Tsvetanov,

Any advice how suppress this error or make it more friendly?

Thanks!
0
Tyler
Top achievements
Rank 1
answered on 08 Aug 2017, 09:29 PM
So updateDateDisplay(view) was commented out of your latest dojo example and it can no longer be reproduced? That is one method that hasn't been posted yet. What is going on in there?
0
Veselin Tsvetanov
Telerik team
answered on 09 Aug 2017, 03:32 PM
Hello Taras,

What I could suggest you is to handle the error by modifying the kendo.ui.scheduler.ResourceView.timeSlotRanges() function in the Kendo source code by caching the error in a try catch block. 

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Taras
Top achievements
Rank 2
answered on 10 Aug 2017, 09:00 AM

Tyler, I've updated the sample with updateDateDisplay() - http://dojo.telerik.com/OLekO/7

But it's not relevant, since it's calling only for other views except month view.

 

Veselin Tsvetanov - Thank you, I'll try that.

Tags
Scheduler
Asked by
Taras
Top achievements
Rank 2
Answers by
Tyler
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Taras
Top achievements
Rank 2
Share this question
or