Page MenuHomePhabricator

Signatures and substitutions remain unparsed in live diff
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

List of steps to reproduce:

  • Enable "Show previews without reloading the page" in Preferences
  • Open an edit form, e.g. Wikipedia:Sandbox
  • Enter e.g. ~~~~ or {{subst:unsigned|Example}} in the textbox
  • Click "Show changes"

What happens?:
The diff shows ~~~~, {{subst:unsigned|Example}}, etc. as entered.

What should have happened instead?:
The diff shows what they would result in when the edit is saved, as in [[User:Example|Example]] ([[User talk:Example|talk]]) 11:46, 3 October 2021 (UTC) or <span class="autosigned" style="font-size:85%;">โ€”&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:Example|Example]] ([[User talk:Example#top|talk]] โ€ข [[Special:Contributions/Example|contribs]]) </span>, etc.

This appears to have been introduced in T109166/d0a3ceee1f28. I believe frompst: 1 is needed in diffPar.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptOct 3 2021, 11:51 AM

This appears to have been introduced in T109166/d0a3ceee1f28. I believe frompst: 1 is needed in diffPar.

That's correct, I missed that param. Already fixed in r725011 for T109166.

Change 725011 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/core@master] Fix API warning in live preview

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

Change 725011 merged by jenkins-bot:

[mediawiki/core@master] Fix API warning in live preview

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

ldelench_wmf set the point value for this task to 1.Oct 7 2021, 5:29 PM

I compared the output of the live diff with the normal diff on beta and saw no differences.

As test data, I used the wikitext we use for our parser tests (the .txt files here), which has a large range of different wikitext including signatures and substitutions.

Test environment: https://en.wikipedia.beta.wmflabs.org MediaWiki 1.38.0-alpha (df729bc) 23:52, 14 October 2021.

I was able to paste as expected above, great work!