<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Bug reports — DataTables forums</title>
        <link>https://datatables.net/forums/</link>
        <pubDate>Wed, 17 Jun 2026 12:42:42 +0000</pubDate>
        <language>en</language>
            <description>Bug reports — DataTables forums</description>
    <language>en</language>
    <atom:link href="https://datatables.net/forums/categories/bug-reports/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>FixedHeader misalignment when Responsive control column is hidden/collapsed</title>
        <link>https://datatables.net/forums/discussion/81795/fixedheader-misalignment-when-responsive-control-column-is-hidden-collapsed</link>
        <pubDate>Fri, 29 May 2026 18:51:26 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>glemos</dc:creator>
        <guid isPermaLink="false">81795@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:</p>

<p><a rel="nofollow" href="https://jsfiddle.net/sancorUI/f85sgzwv/">https://jsfiddle.net/sancorUI/f85sgzwv/</a></p>

<p><strong>Debugger code (debug.datatables.net)</strong>:</p>

<p>-</p>

<p><strong>Error messages shown</strong>:</p>

<p>-</p>

<p><strong>Description of problem</strong>:</p>

<p>The fixedHeader extension miscalculates the width of all table headers when responsive is configured with a control column and that specific control column is hidden</p>

<p>I think the bug is in this function</p>

<pre><code>_api_registerPlural("columns().widths()", "column().width()", function() {
    var columns = this.columns(":visible").count();
    var row = $("&lt;tr&gt;").html("&lt;td&gt;" + Array(columns).join("&lt;/td&gt;&lt;td&gt;") + "&lt;/td&gt;");
    $(this.table().body()).append(row);
    var widths = row.children().map(function() {
        return $(this).outerWidth();
    });
    row.remove();
    return this.iterator("column", function(settings, column) {
        var visIdx = _fnColumnIndexToVisible(settings, column);
        return visIdx !== null ? widths[visIdx] : 0;
    }, 1);
});
</code></pre>

<p>widths has the array of width but this.iterator starts in column 1 (0 is the responsive control column but is hidden)</p>
]]>
        </description>
    </item>
    <item>
        <title>Bug with datetime and dependent</title>
        <link>https://datatables.net/forums/discussion/81704/bug-with-datetime-and-dependent</link>
        <pubDate>Tue, 03 Mar 2026 01:50:38 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">81704@/forums/discussions</guid>
        <description><![CDATA[<p>(I still haven't mastered making an example with Editor <img src="https://datatables.net/forums/resources/emoji/confused.png" title=":/" alt=":/" height="20" />)</p>

<p>When I use a <a rel="nofollow" href="//editor.datatables.net/reference/field/datetime"><code title="Editor field type">datetime</code></a> and have a <a rel="nofollow" href="//editor.datatables.net/reference/api/dependent"><code title="Editor API method">dependent</code></a> on it:</p>

<pre><code>.dependent('datetime_field', function (val, data, callback, e) {
    console.log('Do something here')
    return true
})
</code></pre>

<p>I always get this error when the Editor initially opens:</p>

<blockquote>
  <p>Uncaught TypeError: Cannot read properties of undefined (reading 'length')</p>
</blockquote>

<p>It goes away after that first time even if I open the Editor again.</p>

<p>I haven't tested it otherwise, but I'm opening the Editor with <code>e-edit</code>:</p>

<pre><code>editor.edit( row, opts);
</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>api row() and cell() lack of typing</title>
        <link>https://datatables.net/forums/discussion/81697/api-row-and-cell-lack-of-typing</link>
        <pubDate>Tue, 24 Feb 2026 23:01:47 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>glemos</dc:creator>
        <guid isPermaLink="false">81697@/forums/discussions</guid>
        <description><![CDATA[<p>Hi.</p>

<p><strong>Link to test case</strong>:</p>

<p><a rel="nofollow" href="https://stackblitz.com/edit/vitejs-vite-zcrl5ek8?file=src%2Fmain.ts">https://stackblitz.com/edit/vitejs-vite-zcrl5ek8?file=src%2Fmain.ts</a></p>

<p><strong>Debugger code (debug.datatables.net)</strong>:</p>

<p>N/A</p>

<p><strong>Error messages shown</strong>:</p>

<pre><code>Object literal may only specify known properties, and 'focused' does not exist in type
'Node | JQuery&lt;HTMLElement&gt; | ((idx: number, data: any, node: Node | null) =&gt; boolean) | RowSelector&lt;any&gt;[]'. (2353)
</code></pre>

<p><strong>Description of problem</strong>:</p>

<p>I'm working with DataTables (keytable extension included) and TypeScript. These two method overloads appear to be missing the proper typing for selector modifiers:</p>

<p><a rel="nofollow" href="https://datatables.net/reference/api/cell()#cell(-[-modifier-]-)">https://datatables.net/reference/api/cell()#cell(-[-modifier-]-)</a><br />
<a rel="nofollow" href="https://datatables.net/reference/api/row()#row(-[-modifier-]-)">https://datatables.net/reference/api/row()#row(-[-modifier-]-)</a></p>

<p>Using selector modifiers such as <code>{ focused: true }</code> results in a TypeScript error, even though it is valid according to the documentation.</p>

<p>Would you like me to submit a PR to address this?</p>
]]>
        </description>
    </item>
    <item>
        <title>Serverside table data returned from Editor PHP library is now always sorted by the 1st column.</title>
        <link>https://datatables.net/forums/discussion/81561/serverside-table-data-returned-from-editor-php-library-is-now-always-sorted-by-the-1st-column</link>
        <pubDate>Tue, 09 Dec 2025 05:59:08 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>dabrolga</dc:creator>
        <guid isPermaLink="false">81561@/forums/discussions</guid>
        <description><![CDATA[<p>I have a number of simple serverside tables on a couple of sites that have for many years returned the data from the Editor PHP library unsorted,. The data is ordered to my requirements by the MariaDB view that I pull the data from. Since updating from Editor v2.3.2 to v2.5.1 all my serverside table data is now returned sorted by the first column whereas previously it was unsorted by DataTables. I have not asked for any ordering so I would expect it to be still unsorted. I have tried adding order: [] to my JS but that has no effect as no ordering is specified in the request sent for data.</p>

<p>The problem is being caused by this code In the Editor PHP library Editor.php (I think intoduced in v:2.4.0):</p>

<pre><code>        // Paging makes little sense without an ordering clause, so if there is
        // no order to apply (possible in DT2 on the third click of a header)
        // we apply the primary key as the ordering value.
        if (!isset($http['order']) || count($http['order']) === 0) {
            $query-&gt;order($this-&gt;_pkey[0] . ' asc'); 
        }
</code></pre>

<p>My fix is to comment out the above code, which solves the problem, but it is a bit of an ugly fix.</p>

<p>An example of my JS:</p>

<pre><code>    var table = $("#table_1").DataTable({
        ajax: {
            url: "/php/members.php",
            type: "POST",
        },
        serverSide: true,
        searchDelay: 800,
        columns: [
            {
                data: null,
                defaultContent: "",
                className: "control",
                searchable: false,
                responsivePriority: 10,
            },
            {
                data: "no",
                render: $.fn.dataTable.render.text(),
                responsivePriority: 10,
            },
            {
                data: "nm",
                render: $.fn.dataTable.render.text(),
                responsivePriority: 10,
            },
            {
                data: "email",
                render: $.fn.dataTable.render.text(),
            },
            {
                data: "mob",
                render: $.fn.dataTable.render.text(),
                searchable: false,
            },
            {
                data: "day",
                render: $.fn.dataTable.render.text(),
                searchable: false,
            },
            {
                data: "night",
                render: $.fn.dataTable.render.text(),
                searchable: false,
            },
            {
                data: "secemail",
                render: $.fn.dataTable.render.text(),
            },
            {
                data: "stat",
                render: $.fn.dataTable.render.text(),
                searchable: false,
                responsivePriority: 10,
            },
            {
                data: "cur",
                render: function (data, type, row) {
                    if(data == true) {
                        return "Y";
                    } else {
                        return "N";
                    };
                },
                className: "dt-center",
                searchable: false,
                responsivePriority: 10,
            },
        ],
        ordering: false,
        pagingType: "full_numbers",
        responsive: true,
    });
</code></pre>

<p>And the associated PHP:</p>

<pre><code>// Alias Editor classes so they are easy to use
use
    DataTables\Editor,
    DataTables\Editor\Field,
    DataTables\Editor\Format,
    DataTables\Editor\Mjoin,
    DataTables\Editor\Options,
    DataTables\Editor\Upload,
    DataTables\Editor\Validate,
    DataTables\Editor\ValidateOptions;

// Build our Editor instance and process the data coming from _POST
Editor::inst($db, 'members', 'ID')
    -&gt;fields(
        Field::inst('members.memb', 'no'),
        Field::inst('members.name', 'nm'),
        Field::inst('members.pday', 'day'),
        Field::inst('members.pnight', 'night'),
        Field::inst('members.mobile', 'mob'),
        Field::inst('members.membemail', 'email'),
        Field::inst('members.membemail2', 'secemail'),
        Field::inst('members.status', 'stat'),
        Field::inst('members.isfinancial', 'cur')
    )
    -&gt;validator(function($editor, $action, $data) {
        if ($action !== Editor::ACTION_READ) return ERRMSG['action'];  // Only allow read
    })
    -&gt;process($_POST)
    -&gt;json();
</code></pre>

<p>Is there some method to prevent orderng that I have missed?</p>
]]>
        </description>
    </item>
    <item>
        <title>Not seeing the 'childRow.dt' event triggered.</title>
        <link>https://datatables.net/forums/discussion/81500/not-seeing-the-childrow-dt-event-triggered</link>
        <pubDate>Thu, 06 Nov 2025 19:41:35 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>michael_657</dc:creator>
        <guid isPermaLink="false">81500@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="https://live.datatables.net/dehonimi">https://live.datatables.net/dehonimi</a><br />
<strong>Description of problem</strong>: Following the example provided on "<a rel="nofollow" href="https://datatables.net/reference/event/childRow">https://datatables.net/reference/event/childRow</a>" for handling the 'childRow.dt' event doesn't show any output.</p>

<p>The event doesn't trigger the handler regardless if it's applied before or after table initialization. Listening on either 'childRow' or 'childRow.dt' makes no difference and neither does using a static data set or AJAX for table data. I've also tried adding and removing a row manually afterwards with <code>DtTable.row.add()</code> and <code>DtTable.row().remove()</code>.</p>

<p>Am I doing something wrong or is this event deprecated or perhaps just not working in the latest version of DataTables?</p>
]]>
        </description>
    </item>
    <item>
        <title>Was there some kind of resize changes that got added around the same time as the Column Control?</title>
        <link>https://datatables.net/forums/discussion/81349/was-there-some-kind-of-resize-changes-that-got-added-around-the-same-time-as-the-column-control</link>
        <pubDate>Tue, 09 Sep 2025 22:04:59 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>REJIS</dc:creator>
        <guid isPermaLink="false">81349@/forums/discussions</guid>
        <description><![CDATA[<p>I started playing with the column control around DT 2.3.2, and noticed the columns and/or table doing this weird resize process on page load and when filtering.  It almost looks like it is reading/calculating the width of every item in every column and adjusting sizes as it goes.  The table and column width changes up to 8-10 times at like half second intervals.</p>

<p>At first I thought it was the column control's filters.  I waited until it got updated and just downloaded everything again today, and it still does it.  Even on tables without any Column Control when they load it readjusts itself for a few seconds.  No AJAX calls either.  It is just data local in the table.  I have one page with two tables side by side- one has like 130 rows and the other a little over 1000 with each showing 15 rows at a time in pages.  When the page loads the tables go nuts with one getting bigger and one getting smaller.  It takes 3-5 seconds for them to stop sizing and settle, and is really annoying.  Sometimes the columns will jump in size 10-20 pixels, and towards the end of the process it seems to adjust 1-3 pixels in size.</p>
]]>
        </description>
    </item>
    <item>
        <title>Join tables - one-to-many join with serverSide: true - Not working</title>
        <link>https://datatables.net/forums/discussion/81416/join-tables-one-to-many-join-with-serverside-true-not-working</link>
        <pubDate>Thu, 02 Oct 2025 14:40:08 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>khellendros74</dc:creator>
        <guid isPermaLink="false">81416@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="https://editor.datatables.net/examples/advanced/joinArray.html">https://editor.datatables.net/examples/advanced/joinArray.html</a><br />
<strong>Debugger code (debug.datatables.net)</strong>: opoyod<br />
<strong>Error messages shown</strong>: DataTables warning: table id=messageBoard - Unknown field: permission (index 3)<br />
<strong>Description of problem</strong>: ok, my debug is from my code, but it 100% same code from your example<br />
if i m activating serverSide: true on datatable, with an server Mjoin, ordering, searching are not working with the joined table field from permission</p>
]]>
        </description>
    </item>
    <item>
        <title>Bug Report: Column header misalignment when resizing vertically with scrollY value based on vh</title>
        <link>https://datatables.net/forums/discussion/81156/bug-report-column-header-misalignment-when-resizing-vertically-with-scrolly-value-based-on-vh</link>
        <pubDate>Wed, 16 Jul 2025 18:20:59 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>Sidetrack</dc:creator>
        <guid isPermaLink="false">81156@/forums/discussions</guid>
        <description><![CDATA[<p>Simple test case: <a rel="nofollow" href="https://live.datatables.net/fowibedu/2/edit?js,output" title="https://live.datatables.net/fowibedu/2/edit?js,output"></a><a rel="nofollow" href="https://live.datatables.net/fowibedu/2/edit?js,output">https://live.datatables.net/fowibedu/2/edit?js,output</a></p>

<p>To reproduce, simply resize the window <em><strong>vertically only</strong></em> to trigger the appearance/disappearance of the table body scroll bar...note that the column headings do <em>not</em> resize to reflect the appearance/disappearance of the scrollbar (as they do when resizing the window <em>both horizontally and vertically simultaneously</em>).</p>

<p>In the code, this looks to be due to a conscious choice to <em>only</em> monitor for changes to <em>widths</em> (i.e., to the 0-height dt-autosize element) for purposes of triggering re-adjustment of the columns. However, when the scrollY value is set based on 'vh' units (e.g., scrollY: '50vh', scrollY: 'calc(100vh - 300px)', etc. ), which is done to avoid the potential appearance of an 'ugly' second scrollbar in the element containing the table as a whole, even a pure change in <em>height</em> can cause the appearance/disappearance of the body scrollbar, resulting in this visual glitch.</p>

<p>As a local fix, I've tried modifying the code to attach the ResizeObserver directly to the dt-scroll-body element instead of to dt-autosize so as to detect both width and height changes, which seems to address this issue- though not sure if this will have other/unitended consequences to performance, or otherwise (i.e., the fact that the dt-autosize element was introduced in the first place perhaps suggests there's something wrong with simply observing dt-scroll-body directly)?</p>
]]>
        </description>
    </item>
    <item>
        <title>Headers are misaligned with scrollX: true</title>
        <link>https://datatables.net/forums/discussion/79926/headers-are-misaligned-with-scrollx-true</link>
        <pubDate>Thu, 26 Sep 2024 16:05:25 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>callen</dc:creator>
        <guid isPermaLink="false">79926@/forums/discussions</guid>
        <description><![CDATA[<p><a rel="nofollow" href="https://datatables.net/examples/basic_init/scroll_x.html">https://datatables.net/examples/basic_init/scroll_x.html</a></p>

<p>The example is broken. When using the pagination controls, the headers become misaligned and only show correctly on the first page.</p>

<p>Can this be fixed?</p>
]]>
        </description>
    </item>
    <item>
        <title>Using `orderData` applies sorting arrow styling to wrong column</title>
        <link>https://datatables.net/forums/discussion/80261/using-orderdata-applies-sorting-arrow-styling-to-wrong-column</link>
        <pubDate>Fri, 22 Nov 2024 22:12:23 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>TobiasBg</dc:creator>
        <guid isPermaLink="false">80261@/forums/discussions</guid>
        <description><![CDATA[<p>Hi Allan,</p>

<p>I hope you are doing well! I think I might have found a bug:</p>

<p><strong>Description of problem</strong>:<br />
When using <a rel="nofollow" href="https://datatables.net/reference/option/columns.orderData" title="columnDefs.orderData">columnDefs.orderData</a> in DataTables 2.1.8, the sorting arrow icons are not toggled in the "target" column but in the (potentially hidden) column with the "orderData".<br />
The expected result would be that the sorting arrow icons are updated in the sorted-on column, as is the case with DataTables 1.13.11.</p>

<p><strong>Testcase with DataTables 2.x (nightly)</strong>: <a rel="nofollow" href="https://live.datatables.net/jivalori/1/edit?html,js,output">https://live.datatables.net/jivalori/1/edit?html,js,output</a> (wrong behavior)<br />
<strong>Testcase with DataTables 1.13.11</strong>: <a rel="nofollow" href="https://live.datatables.net/biqogobi/1/edit?html,js,output">https://live.datatables.net/biqogobi/1/edit?html,js,output</a> (expected behavior)</p>

<p>Best wishes,<br />
Tobias</p>
]]>
        </description>
    </item>
    <item>
        <title>colspan not working with single head row</title>
        <link>https://datatables.net/forums/discussion/80146/colspan-not-working-with-single-head-row</link>
        <pubDate>Tue, 29 Oct 2024 11:45:07 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>TobiasBg</dc:creator>
        <guid isPermaLink="false">80146@/forums/discussions</guid>
        <description><![CDATA[<p>According to <a rel="nofollow" href="https://datatables.net/examples/basic_init/complex_header,">https://datatables.net/examples/basic_init/complex_header,</a> <code>colspan</code> is fully support in header rows.<br />
This is working well in that example, obviously, where the header has multiple rows.</p>

<p>However, if a <code>&lt;thead&gt;</code> only has a single <code>&lt;tr&gt;</code> with cells that use <code>colspan</code>, a JavaScript error is raised.</p>

<p>Here is a test case with a single header row and one colspanned cell in it:<br />
<a rel="nofollow" href="https://live.datatables.net/nipufeda/1/">https://live.datatables.net/nipufeda/1/</a></p>

<p>However, when duplicating the row (I prepared that as a HTML comment in the test case), everything works fine again.</p>
]]>
        </description>
    </item>
    <item>
        <title>502 error with live.datatables.net ajax examples</title>
        <link>https://datatables.net/forums/discussion/80050/502-error-with-live-datatables-net-ajax-examples</link>
        <pubDate>Mon, 14 Oct 2024 13:17:01 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>kthorngren</dc:creator>
        <guid isPermaLink="false">80050@/forums/discussions</guid>
        <description><![CDATA[<p><a rel="nofollow" href="https://live.datatables.net/socirone/1/edit">https://live.datatables.net/socirone/1/edit</a></p>

<p>Getting a 502 error running ajax test cases.</p>

<p>Kevin</p>
]]>
        </description>
    </item>
    <item>
        <title>Bug DataTable.Net Editor FieldType:checkbox with bootstrap stylesheet</title>
        <link>https://datatables.net/forums/discussion/79935/bug-datatable-net-editor-fieldtype-checkbox-with-bootstrap-stylesheet</link>
        <pubDate>Fri, 27 Sep 2024 16:50:44 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>oneprogrammer</dc:creator>
        <guid isPermaLink="false">79935@/forums/discussions</guid>
        <description><![CDATA[<p>I initially posted this under free community support.  I was being neutral about calling this a bug and wanted weigh in on it.  But no one had responded.  So I will just file this as a bug with the bootstrap stylesheet because I feel it is not working as it is intended to be working.</p>

<p>Please let me know if you need more from my example.</p>

<p>Link to test case:</p>

<p><a rel="nofollow" href="https://stackblitz.com/edit/stackblitz-starters-toglu3?file=index.html">https://stackblitz.com/edit/stackblitz-starters-toglu3?file=index.html</a></p>

<p>Debugger code (debug.datatables.net):<br />
Not sure what you want here...<br />
Error messages shown:<br />
not error message shown<br />
Description of problem:<br />
Basically the checkbox is not showing checked when using inline row inserting (possible edit to but I haven't got that far yet). It will only show checked when it looses focus. If I remove a class from a div above called "DTE_Field" the checkbox starts working right but then the displaying of the label appears which is not wanted.</p>

<p>Steps and Description is on the test case page I set up for you at the top of the page.</p>

<p>Any help in resolving this would be great</p>
]]>
        </description>
    </item>
    <item>
        <title>Table controls not aligned in Child table</title>
        <link>https://datatables.net/forums/discussion/78833/table-controls-not-aligned-in-child-table</link>
        <pubDate>Thu, 25 Apr 2024 12:09:33 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>PaulVickery</dc:creator>
        <guid isPermaLink="false">78833@/forums/discussions</guid>
        <description><![CDATA[<p>Hi There</p>

<p>I have been successfully using the code outlined by the example here <a rel="nofollow" href="https://datatables.net/blog/2019/parent-child-editing-in-child-rows">https://datatables.net/blog/2019/parent-child-editing-in-child-rows</a></p>

<p>I recently upgraded to the latest libraries and have found that the table controls in the child table no longer align. (ie topStart does not align with topEnd. However, they do in the parent table.</p>

<p>If you look at <a rel="nofollow" href="https://datatables.net/blog/2019/parent-child-editing-in-child-rows">https://datatables.net/blog/2019/parent-child-editing-in-child-rows</a> you will also see the issue.</p>
]]>
        </description>
    </item>
    <item>
        <title>Column size calculation not working when combined with select and rowGroup extension</title>
        <link>https://datatables.net/forums/discussion/79689/column-size-calculation-not-working-when-combined-with-select-and-rowgroup-extension</link>
        <pubDate>Mon, 19 Aug 2024 02:34:36 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>seaninjapan</dc:creator>
        <guid isPermaLink="false">79689@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:<br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>:<br />
<strong>Description of problem</strong>:<br />
We have a more or less complex datatable, which uses the select extension, as well as the rowGroup extension.<br />
Everything worked fine with the 1.x version, but after updating to 2.1.4, the column-sizes are not calculated correctly anymore.</p>

<p>The header-cell of the select column is always wider than the cell of the column itself.<br />
I think the reason for that is the way the width gets calculated for the column. I debugged through the datatable.net code and recognized that the calculation for the column itself works fine and the select column gets calculated with about 20px, which is more or less expected.<br />
But the calculation method is later on called again, i think when the rowGroup extension gets initialized and uses the rowgroup levels as calculation base. The rowGroup div is over the whole width of the table. The table uses btw 100% width.<br />
So it ends up calculating a width of the 100% of the table for the first column.<br />
The following colgroup gets rendered:<br />
<code>&lt;colgroup&gt;&lt;col data-dt-column="0" style="width: 1687px;"&gt;&lt;col data-dt-column="3" style="width: 676.641px;"&gt;&lt;col data-dt-column="4" style="width: 91.8984px;"&gt;&lt;col data-dt-column="5" style="width: 205.047px;"&gt;&lt;col data-dt-column="6" style="width: 122.234px;"&gt;&lt;col data-dt-column="7" style="width: 75.5781px;"&gt;&lt;col data-dt-column="8" style="width: 106.07px;"&gt;&lt;col data-dt-column="9" style="width: 112.906px;"&gt;&lt;col data-dt-column="10" style="width: 138.664px;"&gt;&lt;col data-dt-column="11" style="width: 124.961px;"&gt;&lt;/colgroup&gt;</code></p>

<p>The total width of the table is 1678px. So it assigns the total table width to the first column.<br />
Is this a problem of the calculation? Or is there anything we might be doing wrong on our side?</p>

<p>We have similar issues with the width of details-control, which did only use minimal width in version 1.x. But since update to 2.x in some tables the width has changed and it uses much more space than necessary. Because we render only an icon in there, the calculated space should actually be everywhere the same. But maybe this is worth another ticket?</p>

<p>Setting the width property for the above mentioned columns that not change anything. It gets ignored.</p>
]]>
        </description>
    </item>
    <item>
        <title>Bug in editor searchBuilder example</title>
        <link>https://datatables.net/forums/discussion/79676/bug-in-editor-searchbuilder-example</link>
        <pubDate>Fri, 16 Aug 2024 06:43:26 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>d0night</dc:creator>
        <guid isPermaLink="false">79676@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:  <a rel="nofollow" href="https://editor.datatables.net/examples/extensions/searchBuilder.html">https://editor.datatables.net/examples/extensions/searchBuilder.html</a><br />
<strong>Description of problem</strong>:<br />
SearchBuilder could not use in editor example.<br />
<img src="https://datatables.net/forums/uploads/editor/bm/dda4787g3cb3.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Why can't I log in to the Editor, but DataTables can still work properly?</title>
        <link>https://datatables.net/forums/discussion/79660/why-cant-i-log-in-to-the-editor-but-datatables-can-still-work-properly</link>
        <pubDate>Tue, 13 Aug 2024 23:02:04 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>anders59</dc:creator>
        <guid isPermaLink="false">79660@/forums/discussions</guid>
        <description><![CDATA[<p>Hi Sir:<br />
   Why can't I log in to the editor, but DataTables can still work properly with the same username and password?<br />
I can still use Editor when I log in DataTables. Why?</p>
]]>
        </description>
    </item>
    <item>
        <title>Editor 2.2.2 Upload failing when including additional fields</title>
        <link>https://datatables.net/forums/discussion/77421/editor-2-2-2-upload-failing-when-including-additional-fields</link>
        <pubDate>Tue, 24 Oct 2023 10:06:47 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>James12345</dc:creator>
        <guid isPermaLink="false">77421@/forums/discussions</guid>
        <description><![CDATA[<p>PHP</p>

<pre><code>    -&gt;upload( Upload::inst( savePath.'__NAME__')//.__EXTN__' )
        -&gt;db( 'files', 'id', array(
            'filename'    =&gt; Upload::DB_FILE_NAME,
            'filesize'    =&gt; Upload::DB_FILE_SIZE,
            'web_path'    =&gt; Upload::DB_FILE_NAME, //Upload::DB_WEB_PATH,
            'system_path' =&gt; Upload::DB_SYSTEM_PATH,
            'extension' =&gt; Upload::DB_EXTN,
            'createdate' =&gt; date("Y-m-d H:i:s") ,
            'modifiydate' =&gt; date("Y-m-d H:i:s")    
        ) )
</code></pre>

<p>editor 2.0.10<br />
Upload.php<br />
line 649</p>

<pre><code>    default:
        if ( is_callable($prop) &amp;&amp; is_object($prop) ) { // is a closure
            $q-&gt;set( $column, $prop( $db, $upload ) );
        }
        else {
            $q-&gt;set( $column, $prop );
        }

        break;
</code></pre>

<p>editor 2.2.22<br />
Line 662</p>

<pre><code>default:
    $val = $prop;

    // Callable function - execute to get the value
    if (is_callable($prop) &amp;&amp; is_object($prop)) {
        $val = $prop($db, $upload);
    }

    // If the primary key value was set - use that
    if ($column === $this-&gt;_dbPKey) {
        $insertedId = $val;
    }

    if (is_string($val) &amp;&amp; !empty($val)) {
        // Allow for replacement of __ID__, etc when the value is a string
        $pathFields[$column] = $val;
        $q-&gt;set($column, '-'); // Use a temporary value (as above)
    } else {
        $q-&gt;set($column, $val);
    }

    break;
</code></pre>

<p>Web debug:<br />
The fields "createdate" and "modifiydate" values are set to "-"</p>

<p>Error:<br />
After updating to Editor 2.2.2 and trying to upload a file I started receiving the following error:</p>

<p>"An SQL error occurred: SQLSTATE[22007]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting data and/or time from character string."</p>

<p>Checking the web response the two date fields I specified "createdate" and "modifydate" values were both set to hyphen "-"</p>

<p>After investigating the error it appears to be caused in the Upload.php code section as shown above.</p>

<p>I have reverted the "default" section of code in Upload.php to the Editor 2.0.10 version (as above) and it is working again.  The Editor reference states that you can add additional fields to the array.  I am unsure how to resolve the issue.</p>

<p>The same issue occurs on using PHP 8.1.23 and 8.1.24</p>
]]>
        </description>
    </item>
    <item>
        <title>isTrigger error - seemingly caused when SORTING</title>
        <link>https://datatables.net/forums/discussion/79318/istrigger-error-seemingly-caused-when-sorting</link>
        <pubDate>Mon, 01 Jul 2024 20:29:19 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>dylane</dc:creator>
        <guid isPermaLink="false">79318@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>:  Unfortunately I cannot link to a test case, and the issue seems intermittent and the tables are in a secure portion of the site.</p>

<p><strong>Debugger code (debug.datatables.net)</strong>:   The issue doesn't seem to pop a Datatables error. It results in an error sent to Sentry.</p>

<p><strong>Error messages shown</strong>:<br />
On Sentry, the error looks like this:<br />
Object captured as exception with keys: isTrigger, jQuery3700892121091154535</p>

<p><strong>Description of problem</strong>:<br />
I'm using the DataTables plugin and encountering errors in production. I suspect it's related to sorting, since the requested URL includes these parameters:</p>

<p>•   filters[fiscal_year]=2024<br />
•   filters[month]=04<br />
•   filters[sales_doc_type]=month_summary<br />
•   ... (other filter parameters)<br />
•   draw=3<br />
•   columns[0][data]=placeholder<br />
•   columns[0][name]=placeholder<br />
•   ... (other column definitions)<br />
•   order[0][column]=3<br />
•   order[0][dir]=asc<br />
•   start=0<br />
•   length=50<br />
•   search[value]=<br />
•   search[regex]=false<br />
•   _=1719849866708</p>

<p>While sorting usually doesn't cause errors, it makes testing difficult in this case.</p>

<p>I've encountered two types of errors:</p>

<p>{"isDefaultPrevented":"[Function: returnTrue]","isTrigger":3,"jQuery37008835334434631363":true,"namespace":"dt","result":false,"rnamespace":{},"target":"[HTMLElement: HTMLTableElement]","timeStamp":1719826898448,"type":"error"}</p>

<p>and</p>

<p>{"isTrigger":3,"jQuery37008835334434631363":true,"namespace":"dt","rnamespace":{},"target":"[HTMLElement: HTMLTableElement]","timeStamp":1719826898448,"type":"error"}</p>

<p>There's a similar unresolved issue on the DataTables forum: <a rel="nofollow" href="https://datatables.net/forums/discussion/57125/i-would-like-to-know-the-cause-of-this-error-i-could-not-find-the-solution">https://datatables.net/forums/discussion/57125/i-would-like-to-know-the-cause-of-this-error-i-could-not-find-the-solution</a></p>

<p>Could the issue be related to extremely long ajax requests?  We send a lot of data via ajax to be handled by datatables.</p>

<p>Thanks!</p>
]]>
        </description>
    </item>
    <item>
        <title>FixedColumns not working with StateSave and ServerSideProcessing</title>
        <link>https://datatables.net/forums/discussion/78989/fixedcolumns-not-working-with-statesave-and-serversideprocessing</link>
        <pubDate>Mon, 13 May 2024 09:57:31 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>barth</dc:creator>
        <guid isPermaLink="false">78989@/forums/discussions</guid>
        <description><![CDATA[<p><strong>Link to test case</strong>: <a rel="nofollow" href="https://live.datatables.net/yiwupeja/1/edit?js,console,output">https://live.datatables.net/yiwupeja/1/edit?js,console,output</a><br />
<strong>Debugger code (debug.datatables.net)</strong>:<br />
<strong>Error messages shown</strong>: Uncaught TypeError: a[order[i]] is undefined<br />
<strong>Description of problem</strong>: FixedColumns not working with StateSave and ServerSideProcessing</p>

<p>At first glance, the follwing line in fixedColumns.mjs triggers the problem:</p>

<pre><code>applyStyles(dt.column(idx + ':visible', { page: 'current' }).nodes().to$(), 'body');
</code></pre>

<p>To reproduce, go to a page other than the first page and reload the output-window.</p>
]]>
        </description>
    </item>
    <item>
        <title>DataTables-2.03 Select-2.0.0 nodes is not a function - BUG???</title>
        <link>https://datatables.net/forums/discussion/78589/datatables-2-03-select-2-0-0-nodes-is-not-a-function-bug</link>
        <pubDate>Tue, 26 Mar 2024 05:55:12 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>paul@dmcreative.com</dc:creator>
        <guid isPermaLink="false">78589@/forums/discussions</guid>
        <description><![CDATA[<p>Error message generated in Chrome<br />
<strong>Uncaught TypeError: <a rel="nofollow" href="...">type</a>.nodes is not a function</strong>:</p>

<p>Upgraded to Datatables 2.0.3 and Select 2.0.0 now the following code that previously worked generates the error message.</p>

<pre><code>resident_table.on( 'select', function ( e, dt, type, indexes ) {
    resident_table[type](indexes).nodes().to$().removeClass('warn');
};
</code></pre>

<p>The example on the page: <a rel="nofollow" href="https://datatables.net/reference/event/select">https://datatables.net/reference/event/select</a><br />
Generates the same error.</p>
]]>
        </description>
    </item>
    <item>
        <title>Bug in ssp.class.php</title>
        <link>https://datatables.net/forums/discussion/78571/bug-in-ssp-class-php</link>
        <pubDate>Fri, 22 Mar 2024 20:50:09 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>CraigJ</dc:creator>
        <guid isPermaLink="false">78571@/forums/discussions</guid>
        <description><![CDATA[<p>I believe there is a bug in the ssp.class.php add_bindings function.  I'm looking at the version here: <a rel="nofollow" href="https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php" title="https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php"></a><a rel="nofollow" href="https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php">https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php</a> </p>

<pre><code>static function add_bindings(&amp;$a, $vals)
{
    foreach($vals['bindings'] as $key =&gt; $value) {
        $bindings[] = array(
            'key' =&gt; $key,
            'val' =&gt; $value,
            'type' =&gt; PDO::PARAM_STR
        );
    }
}
</code></pre>

<p>Note that $a is passed by reference, but $a is not used in the function - a new array named $bindings is created.</p>

<p>All line numbers are the line numbers found on this page: <a rel="nofollow" href="https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php" title="https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php"></a><a rel="nofollow" href="https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php">https://github.com/DataTables/DataTablesSrc/blob/master/examples/server_side/scripts/ssp.class.php</a></p>

<p>Also note that on line 387, the variable $bindings is passes to sql_exec, but on line 375 the variable $whereAllBindings is passed to self::add_bindings, not $bindings, so even if the add_bindings function is working correctly, the returned value(s) aren't added the the $bindings array, and therefore aren't included in the call to self::sql_exec on line 387.  I solved this issue by adding the following line immediately after the call to add_bindings on line 375:</p>

<pre><code>$bindings = array_merge( $bindings, $whereAllBindings );
</code></pre>

<p>Becasue $whereAllBindings is needed to get the total record count and needs to contain only the whereAll bindings.</p>

<p>The relevant section of code:</p>

<pre><code>// Likewise for whereAll
    if ( $whereAll ) {
        $str = $whereAll;

        if ( is_array($whereAll) ) {
            $str = $whereAll['condition'];

            if ( isset($whereAll['bindings']) ) {
                self::add_bindings($whereAllBindings, $whereAll['bindings']);
            }
        }

        $where = $where ?
            $where .' AND '.$str :
            'WHERE '.$str;

        $whereAllSql = 'WHERE '.$str;
    }

    // Main query to actually get the data
    $data = self::sql_exec( $db, $bindings,
        "SELECT `".implode("`, `", self::pluck($columns, 'db'))."`
         FROM `$table`
         $where
         $order
         $limit"
    );
</code></pre>

<p>It kind of makes me wonder if a lot of developers aren't using bound parameters like they should and are thus opening themselves to SQL injection attacks, or I could be completely off base here due to lack of coffee...</p>
]]>
        </description>
    </item>
    <item>
        <title>.toJQuery() and .to$() is "not a function" for .node() in DT 2.0</title>
        <link>https://datatables.net/forums/discussion/78205/tojquery-and-to-is-not-a-function-for-node-in-dt-2-0</link>
        <pubDate>Sun, 18 Feb 2024 04:01:10 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>Loren Maxwell</dc:creator>
        <guid isPermaLink="false">78205@/forums/discussions</guid>
        <description><![CDATA[<p>I think this is a bug and not intentional, but <a rel="nofollow" href="//datatables.net/reference/api/.to%24()"><code title="DataTables API method">.to$()</code></a> and <a rel="nofollow" href="//datatables.net/reference/api/.toJQuery()"><code title="DataTables API method">.toJQuery()</code></a> return <code>"not a function"</code> when used with <a rel="nofollow" href="//datatables.net/reference/api/.node()"><code title="DataTables API method">.node()</code></a>.</p>

<p>Might be an artifact of this from the Release Notes:</p>

<blockquote>
  <p>Plural methods were available on singular API invocations. For example row().nodes() was available, even although there was no definition for it - it was rows().nodes() leaking through.</p>
</blockquote>
]]>
        </description>
    </item>
    <item>
        <title>Strange behaviour with destroy of datatable when using SearchPanes</title>
        <link>https://datatables.net/forums/discussion/71178/strange-behaviour-with-destroy-of-datatable-when-using-searchpanes</link>
        <pubDate>Fri, 07 Jan 2022 09:33:41 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>cj1005</dc:creator>
        <guid isPermaLink="false">71178@/forums/discussions</guid>
        <description><![CDATA[<p>Hi, I have multiple web pages that contain a datatable, where the datatable is only initialised once a search condition has been entered, this is working well.</p>

<p>But, I created a new webpage with the same setup as above and it works on the first search but subsequent searches (which causes the datatable to be destroyed and then re initialised) are throwing the error: "Uncaught TypeError: Cannot read properties of null (reading 'clientWidth')".</p>

<p>I've been through the code &amp; compared it to a working web page and the only difference I can see is the new page has searchPanes enabled, so I disabled searchPanes and now it works correctly, so just to confirm the issue I re-instated searchPanes and the error returns.</p>

<p>Thought I should report it to try and get a fix.</p>

<p>I'm happy to give access to my web app to demonstrate the issue if required, just pm me.</p>

<p>Thanks, Chris</p>
]]>
        </description>
    </item>
    <item>
        <title>Editor-NET: Filter on editor is not honored by SearchBuilder/SearchPanes</title>
        <link>https://datatables.net/forums/discussion/77972/editor-net-filter-on-editor-is-not-honored-by-searchbuilder-searchpanes</link>
        <pubDate>Sat, 13 Jan 2024 18:43:51 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>parcival</dc:creator>
        <guid isPermaLink="false">77972@/forums/discussions</guid>
        <description><![CDATA[<p>When you apply a top level filter on a table, this is not taken into account by the options presented by SearchBuilderOptions or SearchPaneOptions.</p>

<p>TLDR: I have created an issue on the GitHub repository and also submitted a <a rel="nofollow" href="https://github.com/DataTables/Editor-NET/pull/12" title="PR">PR</a> with my take on a fix.</p>

<h3 data-anchor="Setup"><a name="Setup" rel="nofollow" href="#Setup"></a>Setup</h3>

<p>Using the current example download for Editor. Showing this with SearchPanes because it is easier to see in the browser:<br />
1. Modify <code>Controllers\SearchPanesController.cs</code> to add a top level filter on site using the Where clause</p>

<pre><code>var response = new Editor(db, "users")
    .Model&lt;UploadManyModel&gt;()
    .Where("site", "1", "=")
</code></pre>

<ol>
<li>Run the project and visit <code>/examples/extensions/searchPanes.html</code></li>
</ol>

<h3 data-anchor="Result"><a name="Result" rel="nofollow" href="#Result"></a>Result</h3>

<p>The resulting table shows the correct data set:<br />
<img src="https://github.com/DataTables/Editor-NET/assets/25994839/65d23c21-317e-4940-b260-efb9e45f8a24" alt="image" /></p>

<p>However, the SearchPanes options still show the options from the full data set:<br />
<img src="https://github.com/DataTables/Editor-NET/assets/25994839/0f60895b-1a73-4bb8-aaa3-c131415f1d2f" alt="image" /></p>

<p>This includes the other options like Name:<br />
<img src="https://github.com/DataTables/Editor-NET/assets/25994839/91c95f6d-e8b4-4ea3-b8e6-f520c1e61a8d" alt="image" /></p>

<p>Selecting one of the pre-filtered names results in zero records found, while the options show there should be one.</p>
]]>
        </description>
    </item>
    <item>
        <title>Payload Holds Old Form Values and New Values, Duplicating Form Variables</title>
        <link>https://datatables.net/forums/discussion/77256/payload-holds-old-form-values-and-new-values-duplicating-form-variables</link>
        <pubDate>Thu, 28 Sep 2023 22:42:49 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>JustinCook</dc:creator>
        <guid isPermaLink="false">77256@/forums/discussions</guid>
        <description><![CDATA[<p>So I have an issue when I submit a form that has DataTables active on it that the Payload is retaining the old form values and has the new values which is duplicating the form and also making it impossible to get rid of the old value.</p>

<p>Here's an example from the Payload:</p>

<p>trackingInstanceId: 1258<br />
criticalImpactCommentsLOCS1258: Test comment<br />
trackingInstanceId: 1258<br />
criticalImpactCommentsLOCS1258: Justin Testing</p>

<p>The first is the original and the second is the new value.  I am using DataTables 1.10.12 and here's my script that creates the table:</p>

<p>$(document).ready(function(){<br />
    $('#myTableInWork').DataTable({<br />
    "order":[[0,'desc']],<br />
    "ordering": true,<br />
    "fixedHeader": true,<br />
    "responsive": true,<br />
    "autoWidth": true<br />
    });<br />
});</p>

<p>I am not using AJAX or anything, just a simple form with a textarea that I fill in and then hit submit.  When I comment out the code above, the form works properly.  So I have narrowed it down to the DataTable tool.  I have Googled and researched all day and cannot find a solution.  Any help or guidance would be much appreciated.</p>

<p>Thanks in advance.</p>
]]>
        </description>
    </item>
    <item>
        <title>DateTime 1.5.1 strange effects</title>
        <link>https://datatables.net/forums/discussion/77037/datetime-1-5-1-strange-effects</link>
        <pubDate>Sun, 27 Aug 2023 15:00:52 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>Lapointe</dc:creator>
        <guid isPermaLink="false">77037@/forums/discussions</guid>
        <description><![CDATA[<p><a rel="nofollow" href="https://editor.datatables.net/examples/dates/time-increment.html">https://editor.datatables.net/examples/dates/time-increment.html</a></p>

<pre><code>       {
            label: 'Shift end:',
            name: 'shift_end',
            type: 'datetime',
            format: 'HH:mm:ss',
            fieldInfo: '24 hour clock format with seconds',
            opts: {
                minutesIncrement: 15,
                secondsIncrement: 15
            }
        }
</code></pre>

<p><img src="https://datatables.net/forums/uploads/editor/wz/z0yl3gvloo0s.png" alt="" title="" /></p>

<p>Other point... If format is set to "HH:mm" picker has no value linked</p>

<pre><code>       {
            label: 'Shift end:',
            name: 'shift_end',
            type: 'datetime',
            format: 'HH:mm'
        }
</code></pre>

<p><img src="https://datatables.net/forums/uploads/editor/37/5zsuh0unt8kw.png" alt="" title="" /></p>

<p>Other point<br />
If setting minutesAvailable: [00, 15, 30, 45], when clicking on hour control, minute is set to current time minute, not regarding minute limitation.<br />
<img src="https://datatables.net/forums/uploads/editor/6a/p8aqfkaubjio.png" alt="" title="" /><br />
Reverse case :<br />
 hoursAvailable: [7, 8, 9, 10, 11] , when clicking on minute control, hour is set to current time hour, not regarding hour limitation.<br />
<img src="https://datatables.net/forums/uploads/editor/ru/9ziyscmmm66r.png" alt="" title="" /></p>
]]>
        </description>
    </item>
    <item>
        <title>Selecting null values in searchpane gives no results when using serverside data</title>
        <link>https://datatables.net/forums/discussion/68490/selecting-null-values-in-searchpane-gives-no-results-when-using-serverside-data</link>
        <pubDate>Fri, 28 May 2021 18:25:49 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>jamesj2</dc:creator>
        <guid isPermaLink="false">68490@/forums/discussions</guid>
        <description><![CDATA[<p>I'm using the serverside: true option with the searchpanes plugin. When there is a null option in the search pane it won't give any results when selecting it.</p>

<p>I've created a example <a rel="nofollow" href="https://github.com/jamesj2/datatables-searchpanes.git" title="repo">repo</a> to replicate the issue. Check the <a rel="nofollow" href="https://github.com/jamesj2/datatables-searchpanes/blob/master/readme.md" title="readme.md">readme.md</a> for instructions on how to set up the app and recreate the issue.</p>
]]>
        </description>
    </item>
    <item>
        <title>Bug Fix for _fnSort</title>
        <link>https://datatables.net/forums/discussion/56942/bug-fix-for-fnsort</link>
        <pubDate>Wed, 26 Jun 2019 19:06:24 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>awelch</dc:creator>
        <guid isPermaLink="false">56942@/forums/discussions</guid>
        <description><![CDATA[<p>I have noticed a problem involving table sorting and found some older posts that seem to be related as well (e.g. <a rel="nofollow" href="https://datatables.net/forums/discussion/32863" title="https://datatables.net/forums/discussion/32863">this discussion</a>).  Due to the current implementation of _fnSort certain situations will make sorting on a column seem non-deterministic.  In particular, if you sort a column that has duplicate data values in it (so the data in each row isn't unique) the sorting can be influenced by previous sorting on the table.  By this I mean, if you sort by a column, then sort by a column with duplicate data values you will see a different order than if you had only sorted by the column with duplicate data values.  You can find an example of this here: <a rel="nofollow" href="http://live.datatables.net/dehifodu/1/edit" title="live.datatables.net/dehifodu/1/edit">live.datatables.net/dehifodu/1/edit</a>.  In this example you can see that although both tables are sorted by the Location column the sorting is substantially different because the bottom table was sorted by Name before being sorted by location.  The effect is that you get multi-column sorting without transparency to the user.  The larger problem with this is that if you clear the table (_fnClearTable) through some means (e.g. <a rel="nofollow" href="//datatables.net/reference/api/ajax.reload()"><code title="DataTables API method">ajax.reload()</code></a> or <a rel="nofollow" href="//datatables.net/reference/api/clear()"><code title="DataTables API method">clear()</code></a>) the sorting from the second column will be removed.  This means upon refreshing a table the sorting can change unexpectedly.</p>

<p>The solution I am currently using for this is a small change to the _fnSort function.  The original code is as follows:</p>

<pre><code>/**
* Change the order of the table
*  @param {object} oSettings dataTables settings object
*  @memberof DataTable#oApi
*  @todo This really needs split up!
*/
function _fnSort ( oSettings )
{

…

/* No sorting required if server-side or no sorting array */
if ( _fnDataSource( oSettings ) != 'ssp' &amp;&amp; aSort.length !== 0 )
{

    // Create a value - key array of the current row positions such that we can use their
    // current position during the sort, if values match, in order to perform stable sorting
    for ( i=0, iLen=displayMaster.length ; i&lt;iLen ; i++ ) {
        aiOrig[ displayMaster[i] ] = i;
    }

…

}
</code></pre>

<p>My proposed solution is to change the above <code>for</code> loop to the following:</p>

<pre><code>for ( i=0, iLen=displayMaster.length ; i&lt;iLen ; i++ ) {
    aiOrig[i] = i;
}
</code></pre>

<p>In doing this <code>aiOrig</code> will not inherit the sorting currently in place on <code>aiDisplayMaster</code>.  From what I can tell <code>aiDisplayMaster</code> seems to be pretty much read-only with the exception of clearing a table or performing sorting.  I don't see a reason to read from the property rather than using an array with no previous sorting performed (i.e. [0, 1, 2, 3, …, n]).</p>

<p>I worried that this may affect the RowReorder plugin but after digging into to it a bit RowReorder seems to manipulate the data source directly rather than <code>aiDisplayMaster</code>.</p>

<p>There are a number of other ways to approach this such as calling <code>_fnClearTable</code> or manually resetting <code>aiDisplayMaster</code> in <code>_fnSortListener</code> before running <code>_fnSort</code> but the proposed solution seemed the cleanest to me.  After a fair amount of testing I haven't seen any adverse effects from its implementation.</p>
]]>
        </description>
    </item>
    <item>
        <title>editor crash in .on('xhr.dt.dte' + this.s.unique, function (e, settings, json)</title>
        <link>https://datatables.net/forums/discussion/76734/editor-crash-in-on-xhr-dt-dte-this-s-unique-function-e-settings-json</link>
        <pubDate>Fri, 14 Jul 2023 00:03:04 +0000</pubDate>
        <category>Bug reports</category>
        <dc:creator>Lapointe</dc:creator>
        <guid isPermaLink="false">76734@/forums/discussions</guid>
        <description><![CDATA[<p>Datatables.editor.js 2.0.10 run OK... testing if json</p>

<pre><code>           .on('xhr.dt.dte' + this.s.unique, function (e, settings, json) {
           ** if (json &amp;&amp; _this.s.table &amp;&amp; settings.nTable === $(table$1)[0]) **{
                // Automatically update fields which have a field name defined in
                // the returned json - saves an `initComplete` for the user
                _this._optionsUpdate(json);
            }
        });
</code></pre>

<p>Datatables.editor.js V 2.1.0 NOK... If json is null, system crash (row 6693)</p>

<pre><code>            .on('xhr.dt.dte' + this.s.unique, function (e, settings, json) {
            var table = _this.s.table;
            if (table) {
                var dtApi = new DataTable.Api(table);
                if (settings.nTable === dtApi.table().node()) {
                    // Automatically update fields which have a field name defined in
                    // the returned json - saves an `initComplete` for the user
                    _this._optionsUpdate(json);
                }
            }
        });
</code></pre>
]]>
        </description>
    </item>
   </channel>
</rss>
