Incorrect sort order and missing results if display format is set to anything other than table

Created on 28 October 2021, over 2 years ago
Updated 14 May 2024, about 1 month ago

Problem/Motivation

When displaying LDAP query results within a view, sorting only works when results are displayed as a table.
When display format is set to anything other than table and the pager is used, items may not show.

Steps to reproduce

These steps to reproduce assume a LDAP server and query have already been configured. We are also using an unformatted list, but we were able to duplicate this using the HTML list and responsive grid. This was tested using our own openLDAP server and a second online server available for testing located at www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/

Create a view to show an LDAP query. Set the view to create a page and set the display format to unformatted list then click save and edit.
In the advanced section of your view under query settings, select your query and click apply.
Under fields, add an LDAP attribute then select SN from the dropdown.
Under sort criteria select LDAP attribute then select SN from the dropdown leave the sort order as ascending.

At this point you should see the issue where items returned from the query don't show.

Next, in the pager section, set it to display all items.

You will now see all items returned from the query but they won't be sorted by SN. If you remove the sorting, you'll see that the sort order is different from the order they were returned from the server.

Add the sorting back if you removed it in the previous step. Now modify the view to display as a table. You will see your results sorted properly. If you enable the pager, all results are shown properly in a paged format.

We assume this is related to the LDAP module or how views is handling the LDAP module since views sorted properly when testing sorting by titles of basic pages.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024