Row Reordering not working with several forms
Row Reordering not working with several forms
rowReordering is not working with all of my forms that use the articles table. In order to see the problem I will need to provide your login/password (same as the past if you remember). My devel site has been moved to a subdomain.
Visit https://smo.cms7.us
Click on the gear icon then login and enter your login/password.
After signing in click on the gear once more then to Dashboard.
The representative form is located under Local --> Stories
I have other forms which are good and compared them with those failing and don't see what is different that is causing the problem. I can provide the code in both the controller file (laravel) and javascript if it helps.
Thx
Answers
I'm not able to login into your site. If RowReorder is not working then is sounds like the table ordering is not correct. The table needs. to be ordered by the column used as the
rowReorder.dataSrc
which by default is the first column. See the second paragraph in the RowReorder docs for more details.Are you trying to save the reordering to the database, ie have
rowReorder.editor
configured?You can post your Javascript code. If using
rowReorder.editor
then the Laravel controller code will need debugging. I don't believe Datatables provides Laravel code and its support should come from the developer of the code.Kevin
Allan has an account; it's probably easier for him to take a look than you, that is, if he can find a break in the storm. That being said. The columns are good and the reorder column is the last. I have other purpose forms using the same model/method that work.
Here is what I have:
The relevant part of the articles table:
MariaDB [cms7_smo]> desc articles;
The entries:
The laravel controller file section which handles the sorting:
The HTML showing # columns:
And finally the relevant JavaScript:
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
Sorry the editor broke up some of the code that was pasted, separating it into two sections.
Thats because you didn't use the Markdown code formatting with triple back ticks (```) around the code blocks.
I'm not familiar with your Laravel code. Since
editor: editor
is defined the server code needs to update the DB correctly and provide the updated rows back to the client. The client side Editor will send the updatedarticles.rowOrder
values to the server to update the DB. The server will return the updated rows. See the client/server data exchange docs for details.Maybe this will help you to troubleshoot while waiting for Allan. See this example. Open the browser's network inspector to view the XHR request and response. Reorder some rows and, if using Chrome, go to the Payload tab. This will show the modified information sent, for example:
Click the Preview tab to see the response, for example:
Are you seeing the correct information sent to the server?
Are you seeing the
articles.rowOrder
values updated correctly in the response?Kevin