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

15 posts, 0 answers
  1. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 20 Jul Link to this post

    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,


  2. Tyler
    Tyler avatar
    19 posts
    Member since:
    Jul 2017

    Posted 21 Jul in reply to Taras Link to this post

    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.
  3. Tyler
    Tyler avatar
    19 posts
    Member since:
    Jul 2017

    Posted 21 Jul in reply to Taras Link to this post

    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.
  4. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    558 posts

    Posted 24 Jul Link to this post

    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.
  5. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 26 Jul in reply to Tyler Link to this post

    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.

  6. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 26 Jul in reply to Veselin Tsvetanov Link to this post

    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.

  7. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    558 posts

    Posted 28 Jul Link to this post

    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.
  8. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 28 Jul Link to this post

    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!

  9. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    558 posts

    Posted 01 Aug Link to this post

    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.
  10. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 04 Aug Link to this post

    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!

  11. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    558 posts

    Posted 08 Aug Link to this post

    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.
  12. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 08 Aug Link to this post

    Hello Veselin Tsvetanov,

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

    Thanks!
  13. Tyler
    Tyler avatar
    19 posts
    Member since:
    Jul 2017

    Posted 08 Aug in reply to Taras Link to this post

    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?
  14. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    558 posts

    Posted 09 Aug Link to this post

    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.
  15. Taras
    Taras avatar
    39 posts
    Member since:
    May 2015

    Posted 10 Aug Link to this post

    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.

Back to Top