Editor : Select2 error when value exists d.getBaseType is not a function

Editor : Select2 error when value exists d.getBaseType is not a function

Dougie-CITDougie-CIT Posts: 3Questions: 1Answers: 0
edited August 2022 in Free community support

Hi folks - thanks in advance for any help.

I am using editor

I can initialise a select2 select and fill values from the server without issue, using the code for the column.

However when that column has a value and I click to inline edit I see this error in the console, I cannot inline edit any column in the row now :
~~~~
I cannot suss out what i am doing wrong and any help appreciated !

ScriptResource.axd?d=NJmAwtEo3Ipnlaxl6CMhvqH1eehdFFnfCSnQ0epjjv0ykHECQfRcC8SKfXlfRHuc5BjXSyZD8RAmuj769cAFXfQLSKp4qnwe5mVCR78Cjig4QrSH6GKmwzBQ-5dDPHxm6xbxDj0oclnTAJ5TxwDc_MOF8UiQeLbPnCu3hbslEWE1&t=49337fe8:5 Uncaught TypeError: d.getBaseType is not a function
at Sys._getBaseMethod (ScriptResource.axd?d=NJmAwtEo3Ipnlaxl6CMhvqH1eehdFFnfCSnQ0epjjv0ykHECQfRcC8SKfXlfRHuc5BjXSyZD8RAmuj769cAFXfQLSKp4qnwe5mVCR78Cjig4QrSH6GKmwzBQ-5dDPHxm6xbxDj0oclnTAJ5TxwDc_MOF8UiQeLbPnCu3hbslEWE1&t=49337fe8:5:11475)
at Type.callBaseMethod (ScriptResource.axd?d=NJmAwtEo3Ipnlaxl6CMhvqH1eehdFFnfCSnQ0epjjv0ykHECQfRcC8SKfXlfRHuc5BjXSyZD8RAmuj769cAFXfQLSKp4qnwe5mVCR78Cjig4QrSH6GKmwzBQ-5dDPHxm6xbxDj0oclnTAJ5TxwDc_MOF8UiQeLbPnCu3hbslEWE1&t=49337fe8:5:7313)
at e (jquery.min.js:4:13154)
at Ab (jquery.min.js:4:13039)
at n.param (jquery.min.js:4:13400)
at Function.ajax (jquery.min.js:4:9596)
at Editor.set (editor.select2.js:221:15)
at Field._typeFn (dataTables.editor.js:6595:23)
at Field.set (dataTables.editor.js:6446:18)
at Field._multiValueCheck (dataTables.editor.js:6570:22)`

        {
                            label: "MDT Type:",
                            name: "MDTType",
                            className: '',
                            opts: {
                                ajax: {
                                    url: "/Webservices/DDL.ashx",
                                    dataType: 'json',
                                    delay: 250,
                                    data: function (params) {
                                    
                                        return {
                                            searchterm: params.term, // search term
                                            DDL: 'mdt'
                                         
                                        };
                                    },
                                    processResults: function (data, params) {
        
                                        return {
        
        
                                            results: data
        
                                        };
                                    },
                                    cache: true
                                },
                                optionsPair:{ label: 'text', value: 'id' }
                            },
                            type: "select2"
                        }

Answers

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    Could you give me a link to your page so I can trace it thought please?

    Thanks,
    Allan

  • Dougie-CITDougie-CIT Posts: 3Questions: 1Answers: 0

    Hi Allan, unfortunately its on a test server that's not open to the internet. I am currently trying to reproduce this but as the select2 is filled from ajax its proving a bit difficult to reproduce it to share.

  • Dougie-CITDougie-CIT Posts: 3Questions: 1Answers: 0

    I have solved the issue s- just leaving this here in case may help others. The site is an old asp.net webforms site and uses ScriptManager which is deploying Microsoft.Ajax.js which is incompatible and prevents the use of the Ajax methods in JQuery. Setting AjaxFrameWorkMode to Disabled allows this to work and causes the page to use the JQuery ajax

Sign In or Register to comment.