Page MenuHomePhabricator

UploadWizard does not recognise newly created categories if already added once
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

  • start the UploadWizard, choose file to upload, define copyright status etc.
  • add a non-existing category
  • create the category (e.g. in another browser tab)
  • optionally delete and re-add the category

What happens?:

The category link stays red and on deleting and re-adding, the category isn't found, and if added by typing the name, appears as a redlink, as before.

What should have happened instead?:

On re-adding the category, it should have been found and become a bluelink (ideally without a need to delete and re-add it, perhaps through a refresh function).

Event Timeline

@LPfi Thanks for adding this, pursuant to our discussion at https://commons.wikimedia.org/w/index.php?title=Commons_talk:WMF_support_for_Commons/Upload_Wizard_Improvements&diff=prev&oldid=1049884186#Categories'_existence_isn't_rechecked . After creating the category, have you tried partially or completely backing out of your session with the Commons UploadWizard and trying again? The wizard may only be reading the state of the category system once at a particular step, rather than representing it live (which might not be technically feasible). Do you have an example file for which you needed to later add the category you wanted to add in the wizard?

I assume that backing out of the UploadWizard session makes one lose all info one has added. I don't know of any way to save that information in a way that allows easy re-adding of it in a new session. Just typing in the category name (or copying and pasting it) is quite easy once you are aware of the problem, but for somebody not aware of the issue, the wizard not finding the category (and redlinking it if entered manually) is very confusing.
I understand that the wizard cannot represent the category state live, but there should be a way to have it refresh its cache.
The situation is common: you have a couple of images of something that isn't represented on Commons from before, so you want to create the category or categories. You might not have checked the categories before, or you realise that also some other category would be appropriate. You might realise the need when you already have added detailed descriptions of many files.
One solution would be to leave the missing categories out in the wizard and add them to the files later, but for a dozen files just checking the categories box and clicking "copy to all files" (or whatever it's called) in the wizard is much less time-consuming.

When filing the bug, I uploaded [[:File:Dombron valflaggning 2025.jpg]] and created [[:c:Category:Category:2025 elections in Finland|]]. That's a typical example. Before uploading I could have thought only of the bridge, then realising the flags and election posters making it relevant also for the non-existing election category (in this case there was another existing election category, but at the time the photo was taken, there probably was none).