Adding new task "Cannot read property 'set' of undefined"

2 posts, 1 answers
  1. Web
    Web avatar
    1 posts
    Member since:
    Feb 2017

    Posted 05 Jun Link to this post

    Hi,

    Can't figure out why the code on the following link is returning this JS error when trying to add a new un-nested task: "Uncaught TypeError: Cannot read property 'set' of undefined"

    I've narrowed it down to the following code - it doesn't seem to be related to the (temporarily blank) create/update/delete parts of the datasource since exactly the same happens even when they return the correct responses, even running the same as the official demos with the exception of changing the datasource to JSON.

     

     

     

     

    https://mtpubdev1.microtest.co.uk/kendo/

     

    Any help would be most appreciated.

    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)
    kendo.all.min.js:80 Uncaught TypeError: Cannot read property 'set' of undefined at init._reorderSiblings (kendo.all.min.js:80) at init.insert (kendo.all.min.js:80) at init.add (kendo.all.min.js:80) at init._createTask (kendo.all.min.js:80) at init.r (kendo.all.min.js:80) at init.trigger (kendo.all.min.js:25) at HTMLButtonElement.<anonymous> (kendo.all.min.js:79) at HTMLDivElement.dispatch (jquery-1.12.4.min.js:3) at HTMLDivElement.r.handle (jquery-1.12.4.min.js:3)

    Any

  2. Answer
    Nencho
    Admin
    Nencho avatar
    1646 posts

    Posted 07 Jun Link to this post

    Hello,

    The reason for the experienced issue is the defined schema. The DefaultValue of the parentId field declaration is missing. Consider the following implementation of the schema:

    schema: {
                    model: {
                        id: "id",
                        fields: {
                            id: { from: "id", type: "string" },
                            orderId: { from: "order_id", type: "number", validation: { required: true } },
                            parentId: { from: "parent", type: "string", defaultValue: null, validation: { required: true } },
                            start: { from: "date_started", type: "date" },
                            end: { from: "date_due", type: "date" },
                            title: { from: "name", defaultValue: "", type: "string" },
                            percentComplete: { from: "percent", type: "number", defaultValue: 0 },
                            summary: { from: "summary", type: "boolean" }, expanded: { from: "expanded", type: "boolean", defaultValue: true }
                        }
                    }
                }

    Hope this would help.

    Regards,
    Nencho
    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.
Back to Top