I noticed that custom pages no longer work. I see the following records in the error logs. I uninstalled and reinstalled the nodebb-custom-pages plugin. I've done several reboots and builds but it didn't work. Why might the problem be caused?
my NodeBB version: 2.2.5
custom pages version: 1.3.3
Solved DataTables on custom plugin page
-
@jjsagan no, look at some other plugin.json files. There's a modules object in addition to a scripts array. It works fine with anonymously defined scripts.
-
Done. Had to deal with the .AMD again, but that was simple.
Thank you so much! you guys are amazing! -
@jjsagan you don't have to deal with .amd if you use
modules
-
@pitaj, it did not work otherwise... Maybe it has something to do with datatables file...
-
@jjsagan it's literally the whole purpose of that field in plugin.json, but you have to use it like this:
require(['datatables'], function (datatables) { ... });
-
This thread might be of help as well: https://community.nodebb.org/topic/11731/how-to-include-the-images-that-are-referred-from-inside-a-third-party-css/14
-
@JJSagan I also try to use datatable in a plugin to display a table on a custom page but without success. I have my html table but datatable doesn't play on it... Do you remember steps to make it works ? Thanks !
-
No matters... I changed my mind. I will not use datatables and stay with bootstrap tables.
-
@alfazaz
Yes,
Create a module, say dt.js.
Paste the datatables code into said file.
That module will be compiled with nodebb, and then you can just require the module in the client.
If you need help let me know. -
@JJSagan Thanks for your answer. I tried it but it was making things bad on reloading the page or loading other pages. I will not use datatables (and it will be easier for me on future updates).
Suggested Topics
-
Unsolved Custom pages stopped working
Technical Support • • kurulumu.Net