Page MenuHomePhabricator

Linter : have correct counters for categories populated with only a few errors (or none)
Closed, ResolvedPublic

Description

Since the modification of Linter to have approximate counters for categories, it seems that some categories never reach "0" even when they are empty for a long time.
For example, on frwiki, the unclosed-quotes-in-heading always show at least "1" even if all errors are regularly fixed.

I understand the use of an approximate count for categories with a high number of errors, but wouldn't it be possible to have a exact count when the approximate count is under a given number (like < 100) ?

The code has been modified to provide accurate counts when less than 20 in a category are present, with the exception that the database can contain stale errors for deleted pages and in other cases when the cache has not been refreshed yet.

Event Timeline

Vvjjkkii renamed this task from Linter : have correct counters for categories populated with only a few errors (or none) to 7tcaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from 7tcaaaaaaa to Linter : have correct counters for categories populated with only a few errors (or none).Jul 2 2018, 4:05 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

Change 677673 had a related patch set uploaded (by Sbailey; author: Sbailey):

[mediawiki/extensions/Linter@master] WIP Make Linter category counts more accurate when counts are low

https://gerrit.wikimedia.org/r/677673

Change 677673 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Make Linter category counts more accurate when counts are low

https://gerrit.wikimedia.org/r/677673

So gerrit patch 677673 modifies the code which generates estimated linter error counts for a category to produce an accurate count when the actual count in the database is less than (20) or whatever MAX_ACCURATE_COUNT is set to in Database.php in the Linter extension directory. While this change will help produce more accurate counts, other issues of when the object cache gets refreshed still apply as does errors that become stale when a page with errors is deleted, prior to a full refresh of the Linter errors from all active pages is performed. Still this should provide better counts in most circumstances.
I am not going to close this ticket as resolved, until a more complete solution is implemented that has fewer caveats.

Sbailey updated the task description. (Show Details)

@Sbailey since I got this issue on 3 pages of https://it.wikivoyage.org/wiki/Speciale:LintErrors, I was wondering if there's a way to force the refresh of the counters. Consider that 2 page counters out of 3, are stuck since a couple of week (+ or -). All of them should be zero.

Let me know

PS @Izno or anyone else, feel free to reply if known how to do it

@Sbailey since I got this issue on 3 pages of https://it.wikivoyage.org/wiki/Speciale:LintErrors, I was wondering if there's a way to force the refresh of the counters. Consider that 2 page counters out of 3, are stuck since a couple of week (+ or -). All of them should be zero.

Let me know

PS @Izno or anyone else, feel free to reply if known how to do it

your issue seems to be T298782. I will run it on itwikivoyage soon and you will have proper statistics next week.

Thanks @Ladsgroup, it seems that the statistics now are almost perfect!

I take the chance to ask you if you know why I still have the discrepancies described in T298343.
Apparently these are the last lint errors in it:voy.

I fixed the content model issues in itwikivoyage as well. Will clean up rest of wikis on Monday.

Thanks again @Ladsgroup.
This morning I've found this new lint error category: https://it.wikivoyage.org/wiki/Speciale:LintErrors/inline-media-caption
but honestly I haven't understood the issue in most of the cases. If I show a File: without thumb/right/left the image, its link and its caption are rendered inside a SPAN so it's fine to show them inline.
But if I use thumb/right/left the same image is rendered inside a DIV so I can understand where the issue is and I know how to solve it.
Any suggestion?

Thanks again @Ladsgroup.
This morning I've found this new lint error category: https://it.wikivoyage.org/wiki/Speciale:LintErrors/inline-media-caption
but honestly I haven't understood the issue in most of the cases. If I show a File: without thumb/right/left the image, its link and its caption are rendered inside a SPAN so it's fine to show them inline.
But if I use thumb/right/left the same image is rendered inside a DIV so I can understand where the issue is and I know how to solve it.
Any suggestion?

The task that implemented that is T297443: Add title/alt attributes from caption to media where caption isn't visible. If you have comments about it you should leave them there.

With the deletion clean up, this is mostly done. Next set of clean up is T298343 but it should be really small.

@Ladsgroup, this has been a minor nuisance for several years. Thanks for resolving it.

@Ladsgroup, this has been a minor nuisance for several years. Thanks for resolving it.

^_^

I boldly close this, There is an edge case outlined in T298343#7660545 but they are quite rare and can be cleaned up separately.