Uncaught TypeError: Cannot read property 'replace' of null

3 posts, 0 answers
  1. rakesh
    rakesh avatar
    1 posts
    Member since:
    Oct 2017

    Posted 26 Oct 2017 Link to this post

    Hello,

    I have a scheduler defined like this:

    @(Html.Kendo().Scheduler<SignalR.Web.Models.EventInput>()
        .Name("scheduler")
        .Date(DateTime.Now)
        .StartTime(new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day))
        .Views(views =>
        {
            views.DayView();
            views.WorkWeekView(workWeekView => workWeekView.Selected(true));
            views.WeekView();
            views.MonthView();
            views.AgendaView();
            views.TimelineView();
        })
        .DataSource(d => d
            .Model(m =>
            {
                m.Id(f => f.Id);
                m.Field(f => f.Title);
                m.Field(f => f.Start);
                m.Field(f => f.End);
                m.Field(f => f.Description);
            })
            .Read("Read", "Scheduler")
            .Create("Create", "Scheduler")
            .Destroy("Destroy", "Scheduler")
            .Update("Update", "Scheduler")

        )
    )

     

    When I load my page, my data loads on the scheduler but I get this error on console:

    Uncaught TypeError: Cannot read property 'replace' of null
        at Object.eval [as tmpl0] (eval at compile (kendo.all.js:194), <anonymous>:3:152)
        at Object.eval (eval at compile (kendo.all.js:194), <anonymous>:3:645)
        at d (jquery.min.js:2)
        at r._createEventElement (kendo.all.js:91346)
        at r._renderEvents (kendo.all.js:91436)
        at render (kendo.all.js:91504)
        at init.refresh (kendo.all.js:100801)
        at init.d (jquery.min.js:2)
        at init.trigger (kendo.all.js:124)
        at init._process (kendo.all.js:7050)

    Then when I click on the scheduler to add a new task on tabs "Work Week", "Week", "Month", no popup to add new Task is displayed.

  2. Tyler
    Tyler avatar
    68 posts
    Member since:
    Feb 2017

    Posted 26 Oct 2017 in reply to rakesh Link to this post

    Are you able to provide a runnable example? I am not familiar with SignalR and don't know how to get your scheduler running in a dojo. 

     

    The reason no pop up shows up to make a new task is because your scheduler already crashed. The Uncaught TypeError has broken your scheduler, so now things may behave with undefined behavior, or not function at all. 

  3. Joana
    Admin
    Joana avatar
    205 posts

    Posted 27 Oct 2017 Link to this post

    Hi all,

    Here you could find an example of the Scheduler usage with SignalR:

    https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/scheduler/scheduler-signalr-local-hub-locking-events

    In addition, here are our demos on the topic for the jquery widget and the MVC wrapper:

    https://demos.telerik.com/kendo-ui/scheduler/signalr

    https://demos.telerik.com/aspnet-mvc/scheduler/signalr


    Regarding the Cannot read property 'replace' of null error, everything seems to work as expected on my end. You could send a support ticket with attached sample project, so that we could investigate what's causing the error.

    Regards,
    Joana
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top