I have purchased the Editor license almost 2 months. I still can't figure out how to use.
I have purchased the Editor license almost 2 months. I still can't figure out how to use.
wonglik
Posts: 29Questions: 2Answers: 0
Hi,
I have already purchased the Editor license (one developer) for almost 2 months. I can't even list the Table as before. It just feezed on screen. I still can't figure out how I can make use of the Editor for inline editing. Can I send in the programs for checking and advise?
Keith Wong
Answers
Two months of debuging! Ouch! You should have posted sooner
Yes, please link to the page you are working on, and show also the server-side code, and I'll take a look at what is going wrong.
Allan
Awaiting for your help.
And what happens when you run it? Any error messages?
Also, can you use the debugger to give me a trace please - click the Upload button and then let me know what the debug code is.
Even better would be if you can link to the page?
And finally, you haven't used the provided Editor PHP libraries. Do you plan to, or are you planning to implement your own server-side database updates?
Allan
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/bootstrap/css/bootstrap-theme.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/font-awesome/css/font-awesome.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/extensions/Editor/css/editor.dataTables.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/css/editor.dataTables.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/plugins/fileinput/css/fileinput.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/jquery-ui/jquery-ui.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/font-awesome/css/font-awesome.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/bootstrap/css/bootstrap-theme.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/extensions/Editor/css/editor.dataTables.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/css/editor.dataTables.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/jquery-ui/jquery-ui.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
orderlist.php:1 Refused to apply style from 'https://192.168.1.251/assests/plugins/fileinput/css/fileinput.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
dataTables.editor.js:1
editor.dataTables.js:1
jquery-ui.min.js:1
orderlist.php:1 Refused to execute script from 'https://192.168.1.251/assests/jquery-ui/jquery-ui.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
dataTables.editor.min.js:1
orderlist.php:1 Refused to execute script from 'https://192.168.1.251/extensions/Editor/js/dataTables.editor.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
orderlist.php:1 Refused to execute script from 'https://192.168.1.251/js/dataTables.editor.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
orderlist.php:1 Refused to execute script from 'https://192.168.1.251/js/editor.dataTables.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
orderlist.js:14 Uncaught SyntaxError: missing ) after argument list
I have added the Editor in a header.php script.
Header.php
<?php require_once 'php_action/core.php'; ?><!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="custom/css/custom.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.13.6/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/rowgroup/1.3.0/css/rowGroup.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/fixedheader/3.2.3/css/fixedHeader.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/searchpanes/2.1.0/css/searchPanes.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/2.4.1/css/buttons.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.7.0/css/select.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/fixedcolumns/4.2.1/css/fixedColumns.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/searchbuilder/1.4.0/css/searchBuilder.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/datetime/1.5.1/css/dataTables.dateTime.min.css">
<link rel="stylesheet" href="../extensions/Editor/css/editor.dataTables.min.css">
<link rel="stylesheet" href="../css/editor.dataTables.css">
<link rel="stylesheet" href="https://cdn.datatables.net/responsive/2.4.1/css/responsive.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/colreorder/1.6.2/css/colReorder.dataTables.min.css">
<link rel="stylesheet" href="../assests/plugins/fileinput/css/fileinput.min.css">
<script src="assests/jquery/jquery.min.js"></script>
<link rel="stylesheet" href="../assests/jquery-ui/jquery-ui.min.css">
<script src="../assests/jquery-ui/jquery-ui.min.js"></script>
<script src="assests/bootstrap/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script src="https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/rowgroup/1.2.0/js/dataTables.rowGroup.min.js"></script> <script src="https://cdn.datatables.net/searchpanes/2.1.0/js/dataTables.searchPanes.min.js"></script>
<script src="https://cdn.datatables.net/select/1.7.0/js/dataTables.select.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.4.1/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/datetime/1.5.1/js/dataTables.dateTime.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.3/js/buttons.print.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.2/moment.min.js"></script>
<script src="https://cdn.datatables.net/searchbuilder/1.4.0/js/dataTables.searchBuilder.min.js"></script>
<script src="https://cdn.datatables.net/datetime/1.2.0/js/dataTables.dateTime.min.js"></script> <script src="https://cdn.datatables.net/fixedcolumns/4.2.1/js/dataTables.fixedColumns.min.js"></script> <script src="https://cdn.datatables.net/fixedheader/3.2.3/js/dataTables.fixedHeader.min.js"></script>
<script src="../extensions/Editor/js/dataTables.editor.min.js"></script>
<script src="../js/dataTables.editor.js"></script>
<script src="../js/editor.dataTables.js"></script>
<script src="https://cdn.datatables.net/responsive/2.4.1/js/dataTables.responsive.min.js"></script>
<script src="https://cdn.datatables.net/colreorder/1.6.2/js/dataTables.colReorder.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- <a class="navbar-brand" href="#">Brand</a> -->
<a class="navbar-brand" href="#" style="padding:0px;">
<img src="logo.png" alt="">
</a>
</div>
</div>
</nav>
<
div class="container">
Sorry, you have reminded me how to debug. I have fixed the 404 problems. But now, still have the error as below.
jquery-3.7.1.js:3783 jQuery.Deferred exception: Cannot read properties of undefined (reading 'sWidth') TypeError: Cannot read properties of undefined (reading 'sWidth')
at HTMLTableCellElement.<anonymous> (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:37674)
at Function.each (https://code.jquery.com/jquery-3.7.1.js:383:19)
at jQuery.fn.init.Qt (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:37608)
at https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:47589
at Function.map (https://code.jquery.com/jquery-3.7.1.js:506:13)
at R (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:47536)
at y (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:23615)
at u (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:23863)
at Jt (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:33052)
at t (https://cdn.datatables.net/1.13.6/js/jquery.dataTables.min.js:4:8610) undefined
jquery-3.7.1.js:3793 Uncaught TypeError: Cannot read properties of undefined (reading 'sWidth')
at HTMLTableCellElement.<anonymous> (jquery.dataTables.min.js:4:37674)
at Function.each (jquery-3.7.1.js:383:19)
at jQuery.fn.init.Qt (jquery.dataTables.min.js:4:37608)
at jquery.dataTables.min.js:4:47589
at Function.map (jquery-3.7.1.js:506:13)
at R (jquery.dataTables.min.js:4:47536)
at y (jquery.dataTables.min.js:4:23615)
at u (jquery.dataTables.min.js:4:23863)
at Jt (jquery.dataTables.min.js:4:33052)
at t (jquery.dataTables.min.js:4:8610)
Usually this is due to having a different number of columns configured in HTML versus in the the Datatables initialization code, ie,
columns
. If this doesn't help please post a link to your page or test case replicating the issue so we can help debug.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
In the test there are 40+ columns but for inline Editing I only setup for 2 columns for test. Can that be done or I have to setup all 40+ columns for editing?
I found that it's the ajax format not suitable for Editor. Before I was using array in dataTable listings. Should I change to include field names in the ajax file?
After changing the ajax. It now has error
jquery.dataTables.min.js:4 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
at jquery.dataTables.min.js:4:33135
at Object.e [as success] (jquery.dataTables.min.js:4:25877)
at fire (jquery-3.7.1.js:3223:31)
at Object.fireWith [as resolveWith] (jquery-3.7.1.js:3353:7)
at done (jquery-3.7.1.js:9627:14)
at XMLHttpRequest.<anonymous> (jquery-3.7.1.js:9888:9)
Changed to the simplest fetchdata.php
<?php
require_once 'core.php';
$userloc = $_SESSION['userloc'] ;
$sql = "SELECT * from Orders where 1 order by RowOrder";
$result = $connect->query($sql);
$output = array('data' => array());
if($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$data[] = $row;
} // /while
}// if num_rows
$connect->close();
header('Content-Type: application/json');
echo json_encode($data);
Can tell me how I can resolve this earlier? I have been trying for so long time to get this Editor workable in my applications.
No - you can specify only specific columns for inline editing. See this example.
I don't actually see your DataTables initialisation in the above deluge of code, but, if you are using the Ajax option you will also need to use
ajax.dataSrc
set to be an empty string, since you appear to be returning a top level array of data. See this example.If you want to do editing, I'd very much encourage you to consider using the Editor PHP libraries. Use Generator to get a quick start for the code needed.
Allan
I have tested with the Generator. It can help to generate workable programs. But I need the Excel like inline editing. How can I change it?
Add something like this to the initialisation JS code that Generator produces:
See the example here.
Allan
Thank you. I can manage inline editing now. But one more question, how to change to Excel like inline editing? Can move around freely.
Also, can add a copy button also?
Use the KeyTable extension like this example.
Yes. See the
copyHtml5
button docs for details. Make sure to include theHTML5 export
library to suport the Copy button. Use the Download Builder to get the appropriate files for your solution.Kevin
I have followed the page to add the same 'keys' , 'select' sections to the test. It still can't do Excel like inline editing. Do I have to add in all the mentioned js and css libraries from the purchased Editor-PHP-2.3.2 to the index.html?
Perhaps you can link to the page you are working on so I can see what might be going wrong? The example Colin linked to appears to be working correctly, so there must be something on your page that we need to identify as the issue or missing.
Allan
Missed this point - sorry. Use the download builder to make sure you get all the files you need (and only the files you need).
Allan