Editor 2.0.5 Bootstrap 5 Error

Editor 2.0.5 Bootstrap 5 Error

ITAppData@HomeStreet.comITAppData@HomeStreet.com Posts: 54Questions: 13Answers: 2

I recently updated an application to the newest version of Editor (2.0.5) and also updated DataTables to the new 1.11.

With only making that change, it appears Editor is failing to open the modals for creation and editing with Bootstrap 5.

The error returned in the console is:

Uncaught TypeError: Cannot read property 'Modal' of undefined
    at Object.open (editor.bootstrap5.js:153)
    at Editor._nestedOpen (dataTables.editor.js:4602)
    at Editor.open (dataTables.editor.js:2982)
    at Object.maybeOpen (dataTables.editor.js:3914)
    at dataTables.editor.js:2191
    at Editor._event (dataTables.editor.js:4103)
    at Editor.create (dataTables.editor.js:2188)
    at B.action (dataTables.editor.js:6633)
    at m (datatables.min.js:302)
    at HTMLButtonElement.<anonymous> (datatables.min.js:303)

This worked fine with Editor 2.0.4 and if I flash back to that version, the page works as expected.

Thanks :)

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    Hi,

    That's interesting. I did make a change for 2.0.5 about how the Bootstrap modal is picked up, but it is working properly on this page. Do you have a page you can link me to showing the error please?

    Thanks,
    Allan

  • ITAppData@HomeStreet.comITAppData@HomeStreet.com Posts: 54Questions: 13Answers: 2

    Thanks Allan for taking a look!

    I actually got it figured out. On this application, I was loading the bootstrap scripts at the end of the page (after the Editor stuff) and apparently in 2.0.5 that causes problems, but didn't in 2.0.4 oddly enough.

    I generally always include the bootstrap scripts first, but I guess I didn't in this case and didn't get burned until now :smile:

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Many thanks - I'll see if I can do something about that in future. Good to ehar you have it working now though.

    Allan

Sign In or Register to comment.