Page MenuHomePhabricator

Live preview shows <previewnote> unparsed, with raw wikitext
Closed, ResolvedPublic

Description

When using the "Show preview" button in zhwiki, message MediaWiki:Previewnote only be displayed as wikitext, Cannot be parsed into html.

See yellow area in screenshot:

Screenshot_2020-10-23 编辑“MediaWiki Previewnote” - 维基百科,自由的百科全书.png (315×1 px, 36 KB)

Event Timeline

Reedy renamed this task from [[zh:MediaWiki:Previewnote]] show wikitext to [[zh:MediaWiki:Previewnote]] show wikitext.Oct 23 2020, 10:17 AM

@Shizhao: Please copy the text in the yellow area also as text into this ticket. Thanks.

This might be a problem with live preview only (Preferences → Editing → Show previews without reloading the page).

Before rMW7e9cac27d115: LivePreview: Show parse warnings and preview header/warning, it used to not show that message at all, unlike normal preview.

在T266311#6574191中,@Aklapper写道:

@Shizhao: Please copy the text in the yellow area also as text into this ticket. Thanks.

[[File:Start hand.svg|65px|left|预览|link=]]
<div style="padding-left:80px">
<b><span style="font-size:115%;color:green">请注意</span></b>,这只是'''预览'''!内容还未保存。
<hr />
*您可以在编辑或修正内容后再次预览。 
*若您对当前的修改感觉满意,请点击'''提交编辑'''按钮以發佈文章。
*若是测试,请改用[[WP:SB|沙盒]]。
</div>
在T266311#6576223中,@matmarex写道:

This might be a problem with live preview only (Preferences → Editing → Show previews without reloading the page).

right! If this option is not checked, there will be no such bug.

Jdforrester-WMF renamed this task from [[zh:MediaWiki:Previewnote]] show wikitext to Live preview shows <previewnote> unparsed, with raw wikitext.Oct 26 2020, 5:53 PM

Change 636780 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] mediawiki.action.edit.preview: Parse 'previewnote' message on the server

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

Change 636780 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.action.edit.preview: Parse 'previewnote' message on the server

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

Jdforrester-WMF assigned this task to matmarex.
Jdforrester-WMF subscribed.

This fix will roll out to production next week.

Krinkle subscribed.

Re-opening as blocker per performance fixme in CR. If not easy to fix, the I'd recommend a temporary revert.

brennen triaged this task as Unbreak Now! priority.Nov 4 2020, 4:01 PM
brennen subscribed.

This is currently marked as a train blocker; setting to UBN!.

I will work on that today, but can't do it right now. I don't think this is a train blocker.

Re-opening as blocker per performance fixme in CR. If not easy to fix, the I'd recommend a temporary revert.

Fine to revert this patch for the time being to unblock train? We can backport the fix as necessary.

Change 639251 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] mediawiki.action.edit.preview: Add versionCallback to improve startup perf

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

Re-opening as blocker per performance fixme in CR. If not easy to fix, the I'd recommend a temporary revert.

Fine to revert this patch for the time being to unblock train? We can backport the fix as necessary.

I'll repeat that I don't think this is a train blocker. We've had very similar code in production for years and it's not bringing the site down. It's a minor performance issue at worst, and I think my proposed fix can be reviewed whenever someone has the time. I shouldn't even have worked on this today.

If you do want to revert regardless, then it's fine, but please also revert https://gerrit.wikimedia.org/r/c/mediawiki/core/+/597262 to avoid regressing this issue (and reopen the issues associated with that).

Change 639495 had a related patch set uploaded (by Krinkle; owner: Bartosz Dziewoński):
[mediawiki/core@wmf/1.36.0-wmf.16] mediawiki.action.edit.preview: Add versionCallback to improve startup perf

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

Change 639251 merged by jenkins-bot:
[mediawiki/core@master] mediawiki.action.edit.preview: Add versionCallback to improve startup perf

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

Change 639495 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.16] mediawiki.action.edit.preview: Add versionCallback to improve startup perf

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

Mentioned in SAL (#wikimedia-operations) [2020-11-05T17:21:21Z] <brennen@deploy1001> Synchronized php-1.36.0-wmf.16/resources/Resources.php: Backport: [[gerrit:639495|mediawiki.action.edit.preview: Add versionCallback to improve startup perf (T266311)]] (duration: 01m 10s)

the problem still exists in zhwiki

Willy1018 subscribed.

I don't see the same problem in zhwiki.

the problem still exists in zhwiki

Sorry about that. The issue is fixed, but the fix has not been deployed to Wikimedia projects yet.

It's included in MediaWiki version 1.36.0-wmf.16, which should be deployed to zhwiki and all other projects early next week (see T263182 for details).