No Code Attached Yet
avatar rjharishabh
rjharishabh
7 Sep 2021

Steps to reproduce the issue

Visit the articles page in the backend
Sort the table, for example - by Status ascending
Just look at the table caption in the developer tools or just remove class="visually-hidden" from the code

Expected result

Correct Sorted by

Actual result

Incorrect Sorted by

sorted

System information (as much as possible)

Joomla 4.0.3-dev
Chrome on Window 10
PHP 8.0.6
MySQLi 10.4.19-MariaDB

avatar rjharishabh rjharishabh - open - 7 Sep 2021
avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2021
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 7 Sep 2021
avatar carlitorweb
carlitorweb - comment - 3 Oct 2021

if ($order !== $selected)
{
$direction = $newDirection;
}
else
{
$direction = $direction === 'desc' ? 'asc' : 'desc';
}
If this condition is deleted, all work as should be. Personally I can't find a use case for this condition, after delete it, all still working okay.

But if not, is just change the sort.php layout and add the correct directions there. I was doing a PR for this, but then the question arose which is the correct way, if delete or not the condition.

avatar rjharishabh
rjharishabh - comment - 7 Oct 2021

Hi @carlitorweb If we delete the condition as you suggested, I think it will break the sorting using table header.

avatar carlitorweb
carlitorweb - comment - 7 Oct 2021

@rjharishabh I checked and the sorting still working

avatar rjharishabh
rjharishabh - comment - 7 Oct 2021

@rjharishabh I checked and the sorting still working

Great, then I think you should create a PR

avatar ReLater
ReLater - comment - 27 Oct 2022

Issue confirmed with Joomla 4.2.3 and 4.2.4. See: #39082

avatar richard67 richard67 - change - 29 Oct 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-10-29 20:50:28
Closed_By richard67
avatar richard67 richard67 - close - 29 Oct 2022
avatar richard67
richard67 - comment - 29 Oct 2022

Closing as having a pull request. Please test #39106 . Thanks in advance.

Add a Comment

Login with GitHub to post a comment