?
avatar brianteeman
brianteeman
14 Mar 2021

In the new mail templates components that can be found on the system dashboard is a language filter

None of the sorting worked - either by clicking on the column title or by selecting from the dropdown

it is easy to test because the up/down arrows never change when you click on any of the three sortable column heading or any of the two types in the dropdown

I did try to fix it some time ago but failed #27325 and forgot to re-open the issue when that was closed

The problem is that the non-standard mthods in this component make using the standard methods for sorting unusable

avatar brianteeman brianteeman - open - 14 Mar 2021
avatar joomla-cms-bot joomla-cms-bot - change - 14 Mar 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Mar 2021
avatar saumyasarkar11
saumyasarkar11 - comment - 14 Mar 2021

In the new mail templates components that can be found on the system dashboard is a language filter

None of the sorting worked - either by clicking on the column title or by selecting from the dropdown

it is easy to test because the up/down arrows never change when you click on any of the three sortable column heading or any of the two types in the dropdown

I did try to fix it some time ago but failed #27325 and forgot to re-open the issue when that was closed

The problem is that the non-standard mthods in this component make using the standard methods for sorting unusable

Can I know the file through which this sorting operates?

avatar joomdonation
joomdonation - comment - 14 Mar 2021

@saumyasarkar11 It is processed in TemplatesModel model https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_mails/src/Model/TemplatesModel.php#L24 . I believe there is a problem with filter_fields https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_mails/src/Model/TemplatesModel.php#L38 . It needs to contains all fields which can be used to order the the result. Try to look at it to see if you could figure out.

avatar joomdonation
joomdonation - comment - 14 Mar 2021

Actually, looking more at the code, look like the sorting is completely ignored for some reasons, this method https://github.com/joomla/joomla-cms/blob/4.0-dev/administrator/components/com_mails/src/Model/TemplatesModel.php#L115 has no sorting code added

@brianteeman I think your PR #27325 is good. We just need to add some code for sorting handling to getListQuery of Templates model. Maybe you can re-open your original PR and we try to add some missing code there?

avatar brianteeman
brianteeman - comment - 14 Mar 2021

Re-opened and conflicts fixed as requested.

avatar brianteeman brianteeman - change - 14 Mar 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-03-14 08:13:54
Closed_By brianteeman
avatar brianteeman brianteeman - close - 14 Mar 2021

Add a Comment

Login with GitHub to post a comment