Page MenuHomePhabricator

{{#expr: expression }} breaks references in the whole article if expression throws an error
Closed, ResolvedPublic

Description

Steps to reproduce

  1. Insert a reference into a page (<ref>something</ref>)
  2. Under reference insert parser function like this: {{#expr: string }}
  3. Under parser function insert <references />

Expected behavior
There should be the reference in references.

Current behavior
Since yesterday there is no reference in the references tag.

Real use case: {{#ifeq: {{#expr: {{{1|}}} < 5 }} | 1 | true | false or error }} if | 1 = string, this makes references in the whole article broken.

This makes thousands of articles on Czech Wikipedia have broken references.

Event Timeline

Dvorapa created this task.Dec 10 2019, 2:32 PM
Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptDec 10 2019, 2:32 PM
Dvorapa renamed this task from {{#expr: expression }} breaks references if expression throws an error to {{#expr: expression }} breaks references in the whole article if expression throws an error.Dec 10 2019, 2:35 PM
Dvorapa updated the task description. (Show Details)
Dvorapa triaged this task as Unbreak Now! priority.Dec 10 2019, 2:37 PM
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)Dec 10 2019, 2:38 PM
Dvorapa updated the task description. (Show Details)
Reedy added a subscriber: Reedy.

Since yesterday there is no reference in the references tag.

I'm guessing this is related to the train deploy yesterday, and the Cite improvements by WMDE, potentially also related to T240248 and the problems highlighted there

Dvorapa updated the task description. (Show Details)Dec 10 2019, 2:50 PM
Dvorapa updated the task description. (Show Details)Dec 10 2019, 2:52 PM
Dvorapa updated the task description. (Show Details)
Dvorapa updated the task description. (Show Details)
Reedy added a comment.Dec 10 2019, 6:23 PM

Is this still broken now T240248 is probably fixed?

Is this still broken now T240248 is probably fixed?

Seems to be working correctly again after the fix for T240248 was deployed. At least for me.

Reedy lowered the priority of this task from Unbreak Now! to High.Dec 10 2019, 7:27 PM
Jdforrester-WMF closed this task as Resolved.Dec 10 2019, 10:22 PM
Jdforrester-WMF claimed this task.
Jdforrester-WMF raised the priority of this task from High to Unbreak Now!.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Let's assume that this is fixed, then.

Change 556328 had a related patch set uploaded (by Awight; owner: Awight):
[integration/config@master] Add ParserFunctions dependency for integration testing

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

Change 556329 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Cite@master] Integration parser test for ParserFunctions

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

Thanks for the report! I wrote a regression test to catch this early, before it happens again.

Change 556328 merged by jenkins-bot:
[integration/config@master] Add ParserFunctions dependency for integration testing

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

For the sake of completeness: The undefined indexes in T240248 are essentially just a side-effect. This here was the actual user-facing issue that silently (after we got rid of the log spam) broke content pages, as described in the commit message.

Both tickets are about the exact same issue in the code.

The patch https://gerrit.wikimedia.org/r/556186 fixed it for real. It got backported and is already live.

Change 556329 merged by jenkins-bot:
[mediawiki/extensions/Cite@master] Integration parser test for ParserFunctions

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