Skip to content

Duplicated category suggestions #1550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolas-raoul opened this issue May 24, 2018 · 8 comments
Closed

Duplicated category suggestions #1550

nicolas-raoul opened this issue May 24, 2018 · 8 comments

Comments

@nicolas-raoul
Copy link
Member

Summary:

Categories suggestion contains duplicates

Steps to reproduce:

In the categories sggestions screen, search for "oculus go"

Commons app version:

2.7.1-debug-search_activity_mock~27e5e9c7

Screen-shots:

screenshot_20180510-201423

Would you like to work on the issue?

Not especially

@gupta1anubhav
Copy link

@nicolas-raoul I have figured out the issue and I am working on it.

@nicolas-raoul
Copy link
Member Author

Could you please post what the Mediawiki API sends?
I suspect that the API does not send duplicate, and the app has a kind of bug that creates duplicates.
If it is the case, then we should fix the bug rather than add de-duplication.
Thanks! :-)

@gupta1anubhav
Copy link

Sorry @nicolas-raoul I am not able to find what Mediawiki API sends if you could help that would be great
In my opinion, duplicates could be because we are merging results from search categories and all categories on the same string.

@whym
Copy link
Collaborator

whym commented Jun 13, 2018

@gupta1anubhav To make sure, you might want to try temporarily inserting Log.d("API.searchCategories", categories.toString()); into somewhere around


(same goes for allCategories)

@nicolas-raoul
Copy link
Member Author

Yes, some debug would be great to find out where the duplicates come from.
I understand that some duplicates may appear from time to time, but often it is the same long list of categories repeated exactly.

@nicolas-raoul
Copy link
Member Author

Also happening in 2.8-release branch:
screenshot_20180718-153628
The same category is indeed added twice to the media on Commons: https://commons.wikimedia.org/w/index.php?title=File%3AHerbert_Von_Karajan_Platz.jpg&type=revision&diff=311621700&oldid=311621611

@nicolas-raoul
Copy link
Member Author

Still happening in 2.9.0:
screenshot_20181203-220219

@ashishkumar468
Copy link
Collaborator

AFAIK, it was fixed in some previous releases, must have been brought back while introducing RX. Have added a fix, will raise a pr soon.

ashishkumar468 added a commit to ashishkumar468/apps-android-commons that referenced this issue Dec 4, 2018
* filter duplicate categories
misaochan pushed a commit that referenced this issue Dec 4, 2018
* Increased timeout to 60 seconds

* Bug fix #1550
* filter duplicate categories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
@whym @nicolas-raoul @ashishkumar468 @gupta1anubhav and others