Admin user search returns no results when results exist

Bug #1536452 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Robert Lyon

Bug Description

There is a scenario where you can get 'No results found' message and 'X results' at the same time

To replicate:

- Have a database with many users in it, say 100
- Have 5 users only with the same last name

Go to the Administration -> Users -> User search page (admin/users/search.php)

Go to the last page of users in pagination

Now type in the 'Search: (All institutions)' box the name you want to search for and click 'Search'

You should see 'No results found' message but also '5 results' at the same time

This is because the search is trying to use the pagination offset rather than beginning at offset 0

Revision history for this message
Robert Lyon (robertl-9) wrote :

There is a [WAR] cb (lib/searchlib.php:332) Invalid argument supplied for foreach() shown for this problem

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/5954

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/5954
Committed: https://git.mahara.org/mahara/mahara/commit/8d571ebb92c1745afc2417b405fecf669bd86fae
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 8d571ebb92c1745afc2417b405fecf669bd86fae
Author: Robert Lyon <email address hidden>
Date: Thu Jan 21 16:27:50 2016 +1300

Bug 1536452: Admin user search giving wrong results

When paginating then searching

See bug for testing info

behatnotneeded

Change-Id: I344cdfe28aee0f8182cfa6214f4dd9611f5666c1
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/6424

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6424
Committed: https://git.mahara.org/mahara/mahara/commit/bff104abe4bde1194954c2b1e1d81e73bd0fc88a
Submitter: Aaron Wells (<email address hidden>)
Branch: 16.04_STABLE

commit bff104abe4bde1194954c2b1e1d81e73bd0fc88a
Author: Robert Lyon <email address hidden>
Date: Thu Jan 21 16:27:50 2016 +1300

Bug 1536452: Admin user search giving wrong results

When paginating then searching

See bug for testing info

behatnotneeded

Change-Id: I344cdfe28aee0f8182cfa6214f4dd9611f5666c1
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 8d571ebb92c1745afc2417b405fecf669bd86fae)

Aaron Wells (u-aaronw)
Changed in mahara:
status: In Progress → Fix Committed
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.