Skip to Content Skip to Menu

[#4823] Wrong sort order of lists

  • GUEST
10 years 2 weeks ago - 10 years 2 weeks ago #252082 by
There seems to be an issue with the sort order of the users lists.

Instead of the given sort order they are sorted by ID in front end.

I.e.:
List A (ID=1, Sort order=1)
List B (ID=2, Sort order=3)
List C (ID=2, Sort order=2)


Will result in following listing in front end: (index.php?option=com_comprofiler&task=userslist).

List A (ID=1, Sort order=1)
List B (ID=2, Sort order=3)
List C (ID=2, Sort order=2)

It sould be the following:

List A (ID=1, Sort order=1)
List C (ID=2, Sort order=2)
List B (ID=2, Sort order=3)


I reported this in the topic for the release of 2.0.2 but was refered here by Nant.


CB: 2.0.2
Joomla: 3.3.6
PHP: 5.3.28
MySql: 5.5.36
Last edit: 10 years 2 weeks ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48536
  • Thanks: 8290
  • Karma: 1445
10 years 2 weeks ago - 10 years 2 weeks ago #252140 by krileon
Replied by krileon on topic Wrong sort order of lists
The sort order of the dropdown? Yup, looks like it has no ordering in its query. Quickfix as follows.

IN: libraries/CBLib/CB/Legacy/cbUsersList.php
ON: Line 277
FROM:
Code:
. "\n AND " . $_CB_database->NameQuote( 'viewaccesslevel' ) . " IN " . $_CB_database->safeArrayOfIntegers( Application::MyUser()->getAuthorisedViewLevels() );
TO:
Code:
. "\n AND " . $_CB_database->NameQuote( 'viewaccesslevel' ) . " IN " . $_CB_database->safeArrayOfIntegers( Application::MyUser()->getAuthorisedViewLevels() ) . "\n ORDER BY " . $_CB_database->NameQuote( 'ordering' );

forge.joomlapolis.com/issues/4823


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 10 years 2 weeks ago by krileon.

Please Log in or Create an account to join the conversation.

  • GUEST
10 years 2 weeks ago #252145 by
Replied by on topic Wrong sort order of lists

The sort order of the dropdown?


Yes. Thank's

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum