PHP 8.0 + Editor upgrading = no data
PHP 8.0 + Editor upgrading = no data
My Web-hotel has updated PHP to version 8.0. After a bit everything but data was OK, so I thought I had to renew my licens to newest version of editor. Having done so, I think I have a license problem. Renewed my license today and downloaded files with license inclusive, uploaded them to my server and linked to them. But I get the following messages:
Uncaught Error:
Editor requires DataTables 1.10.20 or newer
at datatables.min.js:115
at datatables.min.js:45
at datatables.min.js:45
(anonym) @ datatables.min.js:115
(anonym) @ datatables.min.js:45
(anonym) @ datatables.min.js:45
test.php:48 Uncaught TypeError: $(...).DataTable is not a function
at test.php:48
The PHP code does send data to be read by dataTable, but dataTable doesn't read them?
Debugger says all versions are updated.
No Error messages shown except for those under consol
Any ideas as what to do?
Best regards
Claus
This question has accepted answers - jump to:
Answers
This means the server can't find these files.
How is the data sent? Are you using the
ajax
option in Datatables? Where did you look to see that the data is sent?Maybe because of the 404 errors and Datatables code is not initialized? Does the table get formatted with the Datatables elements (like search)?
Seems confusing if you are getting 404 errors.
The Editor is independent of Datatables. Datatables manages the table data while the Editor manages the editing and updating of the backend.
You can post a link to your page or PM Allan with the details for help with debugging. I would start by looking at the XHR request and response when fetching the table data. The next step is hard to say without knowing your configuration and how the table data is fetched and populated.
Kevin
Hi Kevin
Thanks for your response
Changed my links, so they now can find the files. Instead it tells me under consoll, that the version is to old, while the debugger says all are Ok.
Here is a link: https://www.plearn.it/test/Editor/examples/cha_html/test.php
Best regards
Claus
Hi Kevin
I ran the PHP file on it's one
, and it puts out this:
{"data":[{"DT_RowId":"row_0","faggruppe":{"navn":" ","init":"ingen"}},{"DT_RowId":"row_1","faggruppe":{"navn":"\u00d8konomi og ledelse","init":"\u00d8L"}},{"DT_RowId":"row_3","faggruppe":{"navn":"Husdyr og planter","init":"HP"}},{"DT_RowId":"row_4","faggruppe":{"navn":"Natur og Milj\u00f8","init":"NM"}},{"DT_RowId":"row_6","faggruppe":{"navn":"Landskab og byggeri","init":"LB"}},{"DT_RowId":"row_8","faggruppe":{"navn":"\u00d8vrige","init":"\u00d8V"}},{"DT_RowId":"row_9","faggruppe":{"navn":"Timel\u00e6rere","init":"TI"}},{"DT_RowId":"row_12","faggruppe":{"navn":"Tv\u00e6rg\u00e5ende ressourcer","init":"TR"}}],"options":[],"files":[]}
which looks fine to me.
Best regards
Hi
How to contact Allan? What does PM Allan mean?
Best regards
Claus
You are getting two errors:
If you put a breakpoint on line 48 you will see this error occurs before any of your Javascript code is executed. Seems the problem is in the Download Builder bundle. This is something @allan or @colin will need to look at. It seems the editor.js in the bundle, is trying to load before the datatable.js.
Open the file
../DataTables/datatables.min.js
and you will see a link to "Rebuild or modify...". Go to the link and remove the Editor from the list. Load the editor.js and .css files individually after loading the bundle. You should be able to find the files in the original download.You have this statment:
on line 48. Remove this line its not needed. Your Datatable initialization comes later in the $(document).ready() function.
Kevin
Thanks a lot Kevin
Now it runs without any errors in consoll or debugger. But still no data?
Any ideas?
Best regards
Claus
Hi Claus,
Thanks for the link above. Looking at it I can see an error on the console saying:
That is because you are using the
print
button without the Print source code being loaded in. If you update the CDN URL you are using for DataTables to be:That particular issue will "go away" .
When you do that, hopefully data should load into your table as the response from the server looks okay.
Allan
Hi Kevin
It works. You are a star. Thanks a lot for your help.
Best regards
Claus.
Ups, now I see, that the latest answer was from you, Allan. You are also a star. Thanks a lot for your help.
Best regards
Claus