Editor 2.3 Select2 Field Type

Editor 2.3 Select2 Field Type

jtoler5jtoler5 Posts: 93Questions: 34Answers: 3

I wanted to check before I drive myself crazy trying to figure this out! Did anything happen with Editor 2.3 that would cause the code on the Select2 FieldType page to stop working and "select2" not be recognized as a field type? My code has been working just fine forever now and this is the only thing I can think of. I have made a lot of other changes and it could be some change I made that I am not seeing yet. But, I figured I'd at least inquire with you and see if that field type code might have broke with 2.3? Thanks!

I am including the field type code on that page and the actual select 2 plugin, for sure!

Uncaught TypeError: Cannot read properties of undefined (reading 'defaults')
    at ./node_modules/@datatables.net/editor-bs5/js/editor.bootstrap5.mjs (editor.bootstrap5.mjs:20:10)
    at __webpack_require__ (bootstrap:19:1)
    at ./assets/js/admin/funds.js (admin-funds.js:15:84)
    at __webpack_require__ (bootstrap:19:1)
    at __webpack_exec__ (datatables.mjs:124:2)
    at datatables.mjs:124:2
    at __webpack_require__.O (chunk loaded:25:1)
    at datatables.mjs:124:2
    at webpackJsonpCallback (jsonp chunk loading:73:1)
    at admin-funds.js:2:65

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    drive myself crazy
    webpack

    Yup - that would do it :)

    Editor 2.3 was a fairly small change - were you using 2.2.x before? There shouldn't be anything significant I think.

    Does the node_modules/@datatables.net/editor-bs5/js/editor.bootstrap5.mjs file contain a export default ...? It should have export default DataTable.Editor; as the final line (line 285 on the file I'm looking at).

    Allan

  • jtoler5jtoler5 Posts: 93Questions: 34Answers: 3

    Yeah, it does. Unfortunately the is code being developed for a company I work for and sharing the code doesn't make them happy. :smile: I'm going to just do the work and switch back to 2.2.0 (what I was using before), see what happens then.

    Side question: At what version of Editor were you able to install the paid Editor files without having to manually run the node command and reference the zip?

    *image is my node_modules/@datatables.net/editor-bs5/js/editor.bootstrap5.mjs

Sign In or Register to comment.