Page MenuHomePhabricator

Special:MediaSearch shows duplicate results for some queries
Closed, ResolvedPublicBUG REPORT


Steps to Reproduce:

When running a search at Special:MediaSearch that returns a small number of hits, I'm able to see duplicate result items for some searches. Instead of seeing 2 items, I see 4 (each item appears twice). This only happens when JS is enabled, so the duplication does not appear to be happening server-side.

Actual Results:

Screen Shot 2020-06-01 at 10.49.19 AM.png (1×1 px, 1 MB)

These results are the expected ones for the given query, but they each appear twice on the page.

Expected Results:

Each result should only appear once.

Event Timeline

Looks like this might come from the hasMore property defaulting to true in some places – should we default to false instead?

This is blocked until T252685 is complete, which may resolve this issue. If not, we want to solve it using the new CirrusSearch backend.

Change 610286 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Fix duplicate rendering of initial small batch of results

Change 610286 merged by Matthias Mullie:
[mediawiki/extensions/WikibaseMediaInfo@master] Fix duplicate rendering of initial small batch of results

Checked on commons wmf.1 - the issue is fixed. Sometime it seems as though the duplicate images are present when, in fact, there different variations of a file/image, e.g.:

Screen Shot 2020-07-24 at 1.42.57 PM.png (568×1 px, 1 MB)