Hi,
thanks for your post, and sorry for the trouble.
These are different issues. In the “Custom Command”, the desc needs to be a string. Please try again with
"columnDefs": [ { "orderable": false, "targets": [ 2, 3 ] }, {"order": [0, "desc"] } ]
That issue with the Extension sounds really weird. I have no idea what’s going on there. It sounds like a server issue. If you still need this Extension, I suggest to install it via the “Plugins” -> “Add New” -> “Upload” form.
Regards,
Tobias
Thread Starter
Arkona
(@arkona)
Hello Tobias!
Yes, it was a problem with the server. Table Row Order is not to blame. After my complaint corrected. To file .htaccess my site recorded lines:
AddHandler php-cgi .php5 .php
Action php-cgi /cgi-bin/php.fcgi
and everything was fine.
When using the command as you advised interesting effects. When the page is loaded for a moment the table is sorted in reverse order, as should. And then flipped.
Look here: http://www.pl17yar.ru/home/fin-hoz/obem-od/
Thread Starter
Arkona
(@arkona)
Tobias!
I used the “user commands DataTables” commands a lot of options. They or disrupt DataTables JavaScript, or do not work for me. I tried expanding Table Row Order with different shortcodes. No change I had not noticed. My table is still sorted in ascending order.
I thought, sort the table by descending easily, but does not work.
Small question: at the shortcode datatables_sort = true there are options? Which column to sort and in what order? Can reverse the sorting can be done using the shortcode?
Hi,
good to hear that you were able to solve this! It basically sounds like you had to switch to a different version of PHP on the server, via that change in the .htaccess. Nice!
Now, all those sorting problems seem to be related to a script issue that I can see in the JS error log console in the browser. It seems to be caused by some Yandex JS code that you have inserted below the table.
That code however contains HTML <br /> tags in the JS, which breaks the JS. Can you please fix that JS code?
Regards,
Tobias
Thread Starter
Arkona
(@arkona)
Tobias!
I deleted all about Yandex. I forgot metric in the page template. This “metric” is a long time not worked. But nothing has changed. At some point, the table is sorted in descending order, then turns to sort in ascending order.
Hi,
thanks, that’s good!
Now, I just spotted a mistake in the “Custom Command” that I gave you. Sorry for that. Please try again with
"order": [[ 0, "desc" ]], "columnDefs": [ { "orderable": false, "targets": [ 2, 3 ] } ]
Regards,
Tobias
Thread Starter
Arkona
(@arkona)
Many thanks to Tobias!
Now everything works fine.
Good luck in all affairs.
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
Tobias
Thread Starter
Arkona
(@arkona)
Tobias! Sorry to trouble you. Another small question of sorting:
For example, we can use the shortcode [table id=N datatables_paginate="true" /]. This include a breakdown of the tables on the page. And we has an extra shortcode [table id=N datatables_paginate_entries=20 /] that determines how many rows for page.
Shortcode [table id=N datatables_sort="true" /] has additional shortcodes? Which will give the command to determine which column to sort by and the sort order?
This information I have never found.
Thank you in advance for your reply.
Hi,
no, setting which columns can be sorted and the sort order can not be set with Shortcode parameters. They can only be set with a “Custom Command” as the one from above.
The reason for this is that the configuration for this is more complex than just setting e.g. the number of rows per table page.
Regards,
Tobias