Page MenuHomePhabricator

Parsoid's linter doesn't know about thumbtime parameter
Closed, DuplicatePublic

Description

https://www.mediawiki.org/wiki/Special:LintErrors/bogus-image-options

These parameters are added by TimedMediaHandler. Maybe related to the a/v work @Arlolra has been doing?

Event Timeline

Ya, I expect this will be fixed as part of the A/V patches -- but the deploy my not happen till sometime next month. So, for now, if you want, you could add a hardcoded hack to exclude these from linter reports.

Put the hack in Linter or Parsoid?

Change 343080 had a related patch set uploaded (by Subramanya Sastry):
[mediawiki/services/parsoid] T160599: Ignore thumbtime linter errors temporarily

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

Put the hack in Linter or Parsoid?

I added the hack to Parsoid there.

Change 343080 merged by jenkins-bot:
[mediawiki/services/parsoid] T160599: Ignore thumbtime linter errors temporarily

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

Ya, I expect this will be fixed as part of the A/V patches

It will.

Meanwhile, we just deployed this patch but I'm not sure it's working.

I made this page,
https://test.wikipedia.org/w/index.php?title=LintVid&type=revision&diff=311890&oldid=311889

and it's listed in the bogus options,
https://test.wikipedia.org/wiki/Special:LintErrors/bogus-image-options

@ssastry did you test that patch?

mysql:wikiadmin@db1078 [testwiki]> select * from linter where linter_id=418;
+-----------+-------------+------------+--------------+------------+----------------+
| linter_id | linter_page | linter_cat | linter_start | linter_end | linter_params  |
+-----------+-------------+------------+--------------+------------+----------------+
|       418 |       94868 |          3 |            0 |         41 | {"items":[""]} |
+-----------+-------------+------------+--------------+------------+----------------+
1 row in set (0.00 sec)

That's weird...

ssastry triaged this task as Medium priority.Apr 9 2017, 9:57 PM
Arlolra claimed this task.

The wikitext is [[File:Hernia de hiato.ogv||thumbtime=5]], which has ||. So, this was just my typo.

Hmm .. https://wikimania2017.wikimedia.org/wiki/Special:LintErrors/bogus-image-options

[[File:Wikipedia Science Conference 2015 summary video.webm|frameless|right|thumbtime=2:22|Summary video of the [https://wikimedia.org.uk/wiki/Wikipedia_Science_Conference Wikipedia Science Conference 2015] that brought researchers and Wikimedians together]]

That wikitext looks right to me.

All the timedmedia options are going to do that until the a/v patches are merged.

Change 348106 had a related patch set uploaded (by Subramanya Sastry):
[mediawiki/services/parsoid@master] Tweak linter regexp for handling more T160599 scenarios

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

Change 348106 abandoned by Arlolra:
Tweak linter regexp for handling more T160599 scenarios

Reason:
In favour of https://gerrit.wikimedia.org/r/#/c/335956/

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