Talk:Community Wishlist/W281
Add topicThis page is for discussions related to the Community Wishlist/W281 page.
Please remember to:
|
How
[edit]How would you scan for category cycles in real-time? It's important that people are able to quickly add categories so one would probably have only around 1 second per category – it's probably even needed that this is somehow cached so how would you technically roughly implement this?
I don't think there's a way to show a warning to the user that the category addition means it will cause a cycle.
Even if there was a way for that (if that's what you mean here), then the category added may be placed correctly while the category somewhere else is the flawed one.
Also see c:Commons:Database reports/Category cycles and consider that it currently has over 30 k cycles.
If somebody knows a way to solve this issue on WMC, please comment or make a proposal. Maybe a bot could solve most of these but I don't know how that could be done. In regards to your proposal I think it would make most sense to inhibit more cycles once at least the number of existing ones is low. Sadly I don't see technical way for that and users may not be able to fix the situation at another category themselves so preventing the cat-change or asking the user to fix the cat-cycle may often be inappropriate. Prototyperspective (talk) 18:46, 22 October 2024 (UTC)
- @Prototyperspective Sorry I didn't get to this either. I did try creating a prototype to test this. In the end I never got around to fully completing it, but it seemed that cycle detection with the number of edges and vertices we have on enwiki is not so bad in the end. I can try taking a look at this again and providing some benchmarks. J2UDY7r00CRjH (talk) 04:53, 19 November 2025 (UTC)
What specifically are you requesting here?
[edit]What specifically are you requesting here, and why would it help?
Categories containing themselves are the easiest kind of cycle to find and fix.
We already have a tool for reporting cycles.
I don't think (even if it were possible) blocking an edit because it happened to introduce a category cycle is the right thing to do; maybe they wanted to invert two categories, or maybe there's some 100-category-long tree that they shouldn't have to understand. * Pppery * it has begun 16:12, 10 October 2025 (UTC)
- Because of We already have a tool for reporting cycles, the issues described in the thread above and because people shouldn't be bugged with category cycles instead of this being left to category-experienced editors who fix many of these cycles in quick succession, I think this wish would best be set to decline/archived. A separate wish could be made for showing a warning about category cycles at the top of category pages to editors who can then go about to fix them. Prototyperspective (talk) 16:53, 10 October 2025 (UTC)
- Hi @Pppery sorry I didn't see this until now (and sorry to @Prototyperspective for the same reason). I do not seem get notifications one this page (Wishlist item perhaps).
- In any case, what I am suggesting is some mechanism provided by MediaWiki (and applied to Wikipedia) to detect and report cycles to category users in some way that would result in the number of cyclical categories decreasing. You mentioned that we can already detect cycles, and that it would be a bad idea to disallow them completely. I agree on that second point. What I think we should do is alert the user somehow when they attempt to add a cyclic category. We can do this in a few way:
- We could ask for a confirmation after the user clicks "publish changes" on an article, something like
- >The following added category(s) result in a category cycle (learn more). It is recommended for categories to not contain cycles. Do you wish to proceed? [show cycle here]
- As far as I know, there are no similar confirmation dialogs on edit so perhaps a more idiomatic solution is to send the user a notification like so:
- >[dear user etc.] Your recent edit on [page](link) added a category which resulted in a cycle [show cycle here]. It is recommended for categories to not contain cycles (learn more). If this was intended, no further action is needed etc...
- Additionally, we can display when a category is in a cycle in the category page itself. This will alert users to the problem and invite them to fix it.
- TLDR: We should show users the cycles in some way so they can fix it J2UDY7r00CRjH (talk) 04:50, 19 November 2025 (UTC)
- What you said makes sense...there's many category cycles on Commons (see link in thread above) and a first key step to fixing the mess in that area would be to mitigate the creation of even more. However, this wish is very very unclear to readers and not explaining what you explained here or describing the solution you proposed now. I suggest to archive it and if adequate, creating a new rewritten wish about this, including a more descriptive more easily understandable title.
- Moreover, I think category creation shouldn't be made more difficult in such a way. I think it should only show this after the category has been created. So there could be a scan for category cycles right after category creation and a prompt be displayed on the page if it found one.
- However, I don't know if that's feasible or would take too long. Maybe the better action if one was detected would be to create a talk page notification about the cycle on the user's talk page. This could also be done for a fraction of existing items. What about using a new report like the one linked above and post all category cycles for all categories a user created on their talk page up to a certain number like 10 so they can fix it / there's a chance they fix it (and they likely have more knowledge and/or interest in that category than people going over the report to fix random cycles about topics they don't know much about). Prototyperspective (talk) 14:54, 20 November 2025 (UTC)