Upgrade from 1.5.5 to 1.5.6 breaks table.file() & table.files()

Upgrade from 1.5.5 to 1.5.6 breaks table.file() & table.files()

dmcglynndmcglynn Posts: 15Questions: 5Answers: 0

I just verified by swapping the dataTables.editor.min.js & PHP lib files between the two versions.

In 1.5.6, Immediately after uploading a file in the editor, table.file() & table.files() seems to be cleared, and contains only information about the uploaded file.

In 1.5.5, table.file() & table.files() retains information for all other rows after a file is uploaded.

I tested this in the firebug console by entering table.files(<table_name>) after a page reload. (each row has an image, rendered following the table.file() example). The result was an array of information on every image in the table. Normal.. ... Then, I edited a row and uploaded a new file, and executed table.files(<table_name>) again. This time, it resulted in an array with only one element - only the information on the image that I just uploaded. The issue occurs immediately after file-upload, before editor-form submitting.

The result of the bug is that upon submitting the form, the rendering fails for the next row in the table with an image, as table.file(<table_name>) doesn't contain information for that image any longer. The modal editor dialog doesn't even close.

Thanks,
David

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 54,700Questions: 1Answers: 8,556 Site admin

    Hi David,

    Thanks for your question. When you upload a file the server should be returning information about all previously uploaded files, not just the newly uploaded one. This is a limitation that has been present in the whole 1.5 series. It will be addressed with 1.6 which will require only the newly uploaded file's information to be returned.

    Allan

  • dmcglynndmcglynn Posts: 15Questions: 5Answers: 0

    Hi Allan,

    That's just the problem - if I run the 1.5.5 version, I see the information about all previously uploaded files at all times when looking at table.files() as you mentioned.

    If I run the 1.5.6 version, immediately after uploading a file, table.files() only has information about that single file, so when the table refreshes after pressing the OK button on the editor form, the table is unable to find the information about all the previous files, and errors out.

    David

  • allanallan Posts: 54,700Questions: 1Answers: 8,556 Site admin
    Answer ✓

    Hi David,

    That's very odd indeed! Are you able to give me a link to the page (drop me a PM if you can't make it public, by clicking on my name above and then Send message) so I can debug if it is a Javascript or PHP issue?

    Thanks,
    Allan

This discussion has been closed.