GithubHelp home page GithubHelp logo

Comments (20)

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Same with:
Former school https://commons.wikimedia.org/wiki/File:Former_school_in_Le_Puy-Notre-Dame.jpg
Pullman https://commons.wikimedia.org/wiki/File:Portail_hotel_sofitel_pullman_versailles.jpg
Tokyo tower https://commons.wikimedia.org/wiki/File:January_2016_view_from_Mori_Tower.jpg

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

https://commons.wikimedia.org/wiki/Category:Badge actually does not exist and does not seem to have ever existed:

screenshot_2016-03-08-22-32-43

With latest version as of 2016 March 08

from apps-android-commons.

misaochan avatar misaochan commented on May 22, 2024

Hmm. Is this fixable on our end though? We're just returning the categories found via the Commons API. Could there be an issue with the way the API works?

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Is this a limitation documented in the API's documentation?

This is a problem that affects us, and since it is not a problem with our code, we have to report the problem upstream. Probably the best place would be Phabricator? Maybe there is even an existing issue about it already?

from apps-android-commons.

misaochan avatar misaochan commented on May 22, 2024

Okay, I'll ask about it on the #Commons project board, that should be the best place right?

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Do you mean https://commons.wikimedia.org/wiki/Commons:Village_pump ?
People there know about content policies but often not much about technical things

The present problem is probably deep inside the Mediawiki software, and the file search feature is used on many wikis, not just Commons, so I think Phabricator is a better place to ask. It also lowers the probability that the topic gets forgotten :-)

from apps-android-commons.

misaochan avatar misaochan commented on May 22, 2024

Oh, no, I meant what project board I should tag my Phabricator task with. Like https://phabricator.wikimedia.org/tag/commons/

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Oh I understand! Yes sounds good :-)

from apps-android-commons.

misaochan avatar misaochan commented on May 22, 2024

Posted at https://phabricator.wikimedia.org/T139911 , tagging #Commons and #MediaWiki-API. Please feel free to modify my post as needed. :)

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Thanks!

from apps-android-commons.

jayvdb avatar jayvdb commented on May 22, 2024

So, categories do exist when an image uses them, even if a page for the category doesnt exist.

I.e. one image here:
https://commons.m.wikimedia.org/wiki/Category:Flapjack

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

@jayvdb : Thanks for the investigation! https://commons.wikimedia.org/wiki/Category:Flapjack says "This page does not currently exist". The Commons search API seems to return any category name that at least an image uses, regardless of whether the category page exists or not.

If confirmed, I would call that a bug of the API. Or at least we should have the option to ask for only categories with existing pages, imho.

from apps-android-commons.

jayvdb avatar jayvdb commented on May 22, 2024

In mediawiki terminology, the category exists even if the page about the category does not.

You can add extra parameters & properties to the results to filter out those categories, and maybe filter out redirects, etc.
Or maybe you want list=allpages&alnamespace=14

See https://m.mediawiki.org/wiki/API:Allcategories and https://m.mediawiki.org/wiki/API:Allpages

from apps-android-commons.

misaochan avatar misaochan commented on May 22, 2024

Posted by anomie (who also closed the Phab task):

The definition of "category" for list=allcategory includes anything that was ever a category on a page, even if it doesn't have any members anymore. This is independent of whether a corresponding page ever existed in the Category namespace.

See also T28411: Entries for non-existent categories should be deleted from the 'category' table.

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

As an upload client, I guess what we want is not just "categories" as defined in the two previous comments. Instead, we want "currently already in use categories".

@jayvdb: https://commons.wikimedia.org/w/api.php?action=query&list=allcategories&acprefix=badge&aclimit=25&alnamespace=14 says Unrecognized parameter: 'alnamespace'... any idea how to modify the API request to get what we want? Thanks a lot! :-)

Linking to the Phabricator issue for this Mediawiki bug: https://phabricator.wikimedia.org/T28411

from apps-android-commons.

jayvdb avatar jayvdb commented on May 22, 2024

I still dont know 100% what you want, but we are getting close .
I suspect https://commons.wikimedia.org/w/api.php?action=query&list=allcategories&acprefix=badge&acmin=2&acprop=size , with client side ordering, would be appropriate.

But possibly if you have a fixed sized UI list to fill, or you want to get the best results first (responsive app) and fetch lower value results second, issue
https://commons.wikimedia.org/w/api.php?action=query&list=allcategories&acprefix=badge&acmin=100&acprop=size&aclimit=25 first, and if there are less then 25 results, send another query using acmin=2&acmax=9 to fill the UI space available . Categories with only one member are likely to be unsuitable categories

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Interesting!
Server-side ordering would really be more efficient than performing many requests and then dropping most of the results...

Showing first categories that contain many files sounds like a good idea indeed. Also showing categories that are towards the root (even if they have only sub-categories and no files) would probably be another good idea.

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

Using version 2.9.0, category https://commons.wikimedia.org/wiki/Category:Azabujuban_summer_festival was proposed, even though it is a category redirect to the real category https://commons.wikimedia.org/wiki/Category:Azabu-J%C5%ABban_N%C5%8Dry%C5%8D_Matsuri

{{Category redirect|Azabu-Jūban Nōryō Matsuri}}

from apps-android-commons.

ashishkumar468 avatar ashishkumar468 commented on May 22, 2024

Seems to be fixed, feel free to re-open if this still exists on the latest releases

from apps-android-commons.

nicolas-raoul avatar nicolas-raoul commented on May 22, 2024

It is still happening unfortunately.
When I searched for trees in the app I saw this suspicious category: "Trees,nature..."
20201012_082628

Sure enough, Upload Wizard does not allow it:
Screen Shot 2020-10-12 at 08 24 56
For reference here is how the upload wizard looks when typing a valid category name:
Screen Shot 2020-10-12 at 08 24 45

The problem is probably that one picture wrongly uses that category name: https://commons.wikimedia.org/wiki/File:Forest_!!.jpg
Upload Wizard's category search is inferior to our category search, so replacing our search algorithm with theirs is not a good solution. But maybe we should double-check that categories exist before listing them?

from apps-android-commons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.