Page MenuHomePhabricator

Incorrect counters on [[Special:LintErrors]]
Open, Needs TriagePublicBUG REPORT

Description

I know the number of errors on this page is an estimate, but I have realized that an error count of less than 500 is generally accurate.

Exactly, except for errors on deleted pages. These errors persist for a long time after the pages containing them have been removed. When I restore several pages, cleared and deleted again, the number dropped.

Now on pl.wiki (https://pl.wikipedia.org/wiki/Specjalna:B%C5%82%C4%99dy_sk%C5%82adzien) some errors of this type are probably counted in:

  • Wielolinijkowa tabela w elemencie listy (1 błąd) - multiline-html-table-in-list
  • Stare zachowanie znaczników font zawierających linki (14 błędów) - tidy-font-bug
  • Nieprawidłowe opcje pliku (3 błędy) - bogus-image-options
  • Linki w linkach (1 błąd) - wikilink-in-extlink
  • Źle zagnieżdżone znaczniki (149 błędów) - misnested-tag - I think that about 30-40 errors of 149 "are" on deleted pages

Event Timeline

@Malarz_pl: Thanks for reporting this. Please use the bug report form (linked from the top of the task creation page) to create a bug report, and fill in the sections in the template instead of deleting them, so your bug report is structured and easier to understand.

Aklapper changed the task status from Open to Stalled.Mon, Apr 29, 11:39 AM

Numbers are updated by running initSiteStats.php. initSiteStats.php is run at 05:39 UTC on 1st and 15th of each month.

Setting status to stalled as it's unclear which numbers are expected on which exact page (full URL) at which exact time.

On page: https://pl.wikipedia.org/wiki/Specjalna:B%C5%82%C4%99dy_sk%C5%82adniowe

are listed errors:

  • Nadmiarowe znaczniki tabeli do usunięcia (0 błędów)
  • Błędnie zagnieżdżony znacznik z różnym renderowaniem w HTML5 i HTML4 (0 błędów)
  • Inne problemy (0 błędów)
  • Wielolinijkowa tabela w elemencie listy (1 błąd)
  • Wiele niezamkniętych tagów formatujących (0 błędów)
  • Obejście błędnego generowania akapitów (0 błędów)
  • Samozamykające się znaczniki (0 błędów)
  • Stare zachowanie znaczników font zawierających linki (14 błędów)
  • Błąd parsowania spacji (0 błędów)
  • Niezamknięty apostrof w nagłówku (0 błędów)

Średni priorytet

  • Nieprawidłowe opcje pliku (3 błędy)
  • Osierocona zawartość (0 błędów)
  • Źle zagnieżdżone znaczniki (120 błędów)
  • Wiele dwukropków poprzedzających (0 błędów)
  • Linki w linkach (1 błąd)

...

Some of them have continusly more then 0 error, but in fact there are no errors:

One of them indicate all the time 30-40 more errors then is in real:

This is probably related to errors on deleted pages.

This is probably related to errors on deleted pages.

As far as I know numbers are updated twice a month. Would be great to check again in three days if still such a problem

Numbers are esimated all the time.

The small numbers (<500?, <1000?) are esimated precisely and in most cases are uptaded a few second after article edit and IT WORKS. Propably without updating number of errors left in deleted article.

You can see it (dropping numer) in line with "Źle zagnieżdżone znaczniki". We propably clean them all in two days. Number is still bigger by 40-45 then real number of errors.

Maybe twice a month is updated basis for estimates.

Deleting a page should clear its entries from the linter table,
https://github.com/wikimedia/mediawiki-extensions-Linter/blob/master/includes/Hooks.php#L112-L129

Below a certain threshold, counts should be accurate,
https://github.com/wikimedia/mediawiki-extensions-Linter/blob/master/includes/Database.php#L308-L345

However, there have been times when the service has been interrupted and lints for a deleted page get orphaned.

The task T165538 exists to purge stale data that occurs in the linter table for a variety of reasons.

Deleting a page should clear its entries from the linter table,
https://github.com/wikimedia/mediawiki-extensions-Linter/blob/master/includes/Hooks.php#L112-L129
...
However, there have been times when the service has been interrupted and lints for a deleted page get orphaned.

From my observations, it doesn't work at all. The only solution that works is to restore the page, clear it and delete it again.

The task T165538 exists to purge stale data that occurs in the linter table for a variety of reasons.

We'll wait until the orphans are cleaned up.

From my observations, it doesn't work at all. The only solution that works is to restore the page, clear it and delete it again.

I tested on a local wiki and the code seems to work, the lints were cleaned up after deleting the page. Can you provide an example of a page recently deleted that left around lint errors?

This is probably related to errors on deleted pages.

As far as I know numbers are updated twice a month. Would be great to check again in three days if still such a problem

It's been over 24 hours since "05:39 UTC on 1st" and the numbers are still wrong.

Aklapper changed the task status from Stalled to Open.Sat, May 4, 9:10 AM

I tested on a local wiki and the code seems to work, the lints were cleaned up after deleting the page.

My testing was insufficient, likely invoking the callback synchronously. I had previously fixed this problem in I2610b9b16d4032b0e18b3537cc9ed51bfdaff299 but a recent refactoring in Ib3d3622144b670ebe1a4ce04e6db6811584d42c8 broke it again.

Change #1027114 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/Linter@master] Fix regression clearing lints on page deletion

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

Change #1027114 merged by jenkins-bot:

[mediawiki/extensions/Linter@master] Fix regression clearing lints on page deletion

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

@ABreault-WMF thanks. It works for new deletion. I tested on https://pl.wikipedia.org/w/index.php?title=Wikipedysta:Malarz_pl/brudnopis/modu%C5%82&action=edit&redlink=1.

Will the old ones be corrected when refreshed on the May 15th as wrote @Aklapper (on April 29th)?