On ecommerce/Product category the Table sorting doesnot work properly
in the following page the table sorting doesnot works correctly

Thanks for the report. I'll try to reproduce that later
Table sort for ecommerce reports seems to be broken - however, I can't reproduce this on all instances (all version 4.10.1 currently), just some.
Maybe https://github.com/matomo-org/matomo/issues/8556 is a duplicate.
@peterbo would you mind checking if the request parameters sent to load the datatable differ on an instance where it works vs a not working one?
Hey @sgiehl !
There doesn't seem to be a big difference:
Working example from Browser Console:
date | yesterday isFooterExpandedInDashboard | 1 abandonedCarts | 0 viewDataTable | table module | Goals format | html action | getItemsName period | day idSite | 9 random | 7206 filter_offset | 0 totals | 1 filter_limit | 10 filter_sort_column | nb_visits filter_sort_order | desc keep_totals_row | 0
Example with failed sorting:
date | 2022-08-04 isFooterExpandedInDashboard | 1 abandonedCarts | 0 viewDataTable | table module | Goals format | html action | getItemsName period | day idSite | 1 random | 381 filter_offset | 0 totals | 1 filter_limit | 10 filter_sort_column | nb_visits filter_sort_order | desc keep_totals_row | 0
@peterbo ok. that looks normal. Would you check if you have some settings stored for that report in the options table. option_name should be something like viewDataTableParameters_{login}_Goals.getItemsName
I don't have direct DB access on the instance that shows the error, unfortunately. However, I created a new User for making sure, that no custom settings are done to the datatable configuration. In the config.ini.php, there are also no custom settings for the datatables (e.g. limits). Sorting error still persists.
Hm. As long as I'm not able to reproduce that, it might be hard to find the reason. If it's not caused by some datatable settings that are stored, there needs to be another reason I currently can't see. Are you able to see if the table is sorted by another column instead? Maybe the label, or another column like visits or similar? Also it would be interesting to know if that only happens in the UI or if the API also sorts incorrectly when providing sort flags...
closing in favor of #21829