Editor, New, Edit, Delete buttons does nothing....
Editor, New, Edit, Delete buttons does nothing....
Hi!
So I'm trying out the demo...
I've basically copied this example: https://editor.datatables.net/examples/advanced/joinArray.html just replacing data, fetching from my own database. The javascript and php code is the same otherwise. I've managed to collect the data (regarding a earlier question regarding GROUP_CONCAT, the mjoin does excactly that, brilliant!) and it shows up as it should in the table.
Sorting works. I have no null or empty values anywhere, it's only 3 rows by the way...
What does not work is the edit buttons. No edit window pops up or any other warning even. I do get a JS-error in the console:
TypeError: c(((X3 + x4I) + x4I) + k7E)[Q4] is undefined,
Clicking on the error sends me to datatables.js line 262:
;f.prototype._tidy=function(a){var y6E="ubb",N0E="line",f6="draw",d0l="mplete",c0l="verS",Y4E="Ser",k7E="ings",Z8I="aT",b=this,c=this[C2f.J0I][C2f.j5E]?new d[(C2f.Z9)][(u0l+x4I+Z8I+C2f.d2+C2f.J2+C2f.t4I)](a7E+e3I):w1E,e=!g4;c&&(e=c(X3+x4I+x4I+k7E)[Q4][l3E][(C2f.J2+Y4E+c0l+d1I+M7I)]);return this[C2f.J0I][n5E]?(this[(G9l)]((g6+l5+d0l),function(){if(e)c(C2f.M3I+D7E);else setTimeout(function(){a();}
I have no clue what's going on, hopefully you can point me towards an easy fix...
If I get everything working I'm definitely getting the purchase version, seems really great so far!
This question has an accepted answers - jump to answer
Answers
Could you give me a link to the page so I can try to debug it please? I'm not immediately sure what the issue it there and would probably need to see the code.
Allan
Unfortunately it's under development and only available locally.
But i managed to find the problem, it was just a misspelled table-id in the javascript.
Now the buttons work and it opens up the bubble window. Another issue appeared though. I receive all data and I have a table "roles" which is equal to "access" in your demo.
And I have managed to receive all roles for each user by Mjoin, just like in your example.
The roles also appear as expected separated by "," in the table.
But.... When I choose a row and then open "edit" bubble, or open the "new" bubble, the checkboxes do not appear, it's completely blank.... If I edit and update, all roles for that user will also be deleted from the database.
If you have a quick tip why checkboxes don't appear in the bubble, let's hear it, but I feel I need to do some bugsearching myself before I start a new question... Maybe has something to do with the fact I'm using Bootstrap styling? That's the only difference I can find from your demo example?
EDIT: FIXED! Not a bug or problem in the editor code. user error, misspelled field-id...
Hi,
Thanks for posting back with the updates. Great to hear that you've got it working now!
Regards,
Allan