Page MenuHomePhabricator

LivePreview doesn't work with ProofreadPage pages
Open, Needs TriagePublic2 Estimated Story Points

Description

See this page: open it for editing and hit "Show changes". The displayed diff should be empty, but isn't.

Cannot reproduce, the diff is empty for me, as it should be.

Ah. It seems to be dependent on the Editing → Show previews without reloading the page setting being turned on in Preferences. When that pref is on it shows:

2021-10-11_160516_1464x758_screenshot.png (758×1 px, 248 KB)

When it's off I get a clean diff.

Event Timeline

Daimona renamed this task from Live preview diff for ProofreadPage has broken diff since last wikidiff2 upgrade to LivePreview doesn't work with ProofreadPage pages.Mon, Oct 11, 5:56 PM
Daimona edited projects, added Community-Tech; removed wikidiff2.

Very likely to be caused by the switch to ApiCompare that we did for T109166. So still CommTech work, but unrelated to wikidiff2.

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

[mediawiki/core@master] Live preview: use the correct content model

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

Change 730527 merged by jenkins-bot:

[mediawiki/core@master] Live preview: use the correct content model

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

Does the CI-related patch to PRP's tests from T292676 need to be backed out also or is that in practice unrelated?

Does the CI-related patch to PRP's tests from T292676 need to be backed out also or is that in practice unrelated?

No, that's completely unrelated. This particular issue was caused by r723258.

@Daimona I am finding if I go to a new proofreading page (e.g. https://en.wikisource.beta.wmflabs.org/w/index.php?title=Page:Wind_in_the_Willows_(1913).djvu/249&action=edit ) and immediately click "Show change", I see <references/>. I don't see it with normal preview. Is this related?

live_preview_wikisource_references.png (208×1 px, 27 KB)

@Daimona I am finding if I go to a new proofreading page (e.g. https://en.wikisource.beta.wmflabs.org/w/index.php?title=Page:Wind_in_the_Willows_(1913).djvu/249&action=edit ) and immediately click "Show change", I see <references/>. I don't see it with normal preview. Is this related?

live_preview_wikisource_references.png (208×1 px, 27 KB)

I'm not sure, but I see that the "footer" section in the editing interface does have <references/> inside when you open that page. I tried to save without making any change, and the diff has a size of +13, meaning that <references/> is indeed saved as page content. So I'd say it's fine, even if the normal preview doesn't show it. @Samwilson do you have any idea about this?

@Daimona I am finding if I go to a new proofreading page (e.g. https://en.wikisource.beta.wmflabs.org/w/index.php?title=Page:Wind_in_the_Willows_(1913).djvu/249&action=edit ) and immediately click "Show change", I see <references/>.

When creating a page in the Page: namespace, Proofread Page will populate the Header and Footer sections with the contents of the Header and Footer fields in the associated Index: page (with some custom variable substitutions, mainly {{{pagenum}}} at present). The functionality is intended to ease the insertion of running headers that follow some kind of schema that is consistent within the work or part of a work (here, presumably, footnotes on every page; but it could equally be the current page number centred at the top of the page, etc.).

I have tested this on a variety of different content models on a few different beta wikis. I checked that the appropriate content model was being passed to the tocontentmodel-main and (if the page were new) fromcontentmodel-main API parameters. In theory, as long as the Compare API understands the content model it should return the correct output (and if it does not that is not a bug we have caused).

I tested both existing pages and new pages (if possible) and compared the output to normal diff.

Pages tested include:

Test environments: https://en.wikisource.beta.wmflabs.org, https://en.wikipedia.beta.wmflabs.org, https://commons.wikimedia.beta.wmflabs.org, https://ar.wikipedia.beta.wmflabs.org, MediaWiki 1.38.0-alpha (d2917ab) 00:02, 18 October 2021.

N.B. I found this bug T293597 during testing, but not directly related to this change.

@Daimona I am finding if I go to a new proofreading page (e.g. https://en.wikisource.beta.wmflabs.org/w/index.php?title=Page:Wind_in_the_Willows_(1913).djvu/249&action=edit ) and immediately click "Show change", I see <references/>.

When creating a page in the Page: namespace, Proofread Page will populate the Header and Footer sections with the contents of the Header and Footer fields in the associated Index: page (with some custom variable substitutions, mainly {{{pagenum}}} at present). The functionality is intended to ease the insertion of running headers that follow some kind of schema that is consistent within the work or part of a work (here, presumably, footnotes on every page; but it could equally be the current page number centred at the top of the page, etc.).

Thanks for the explanation. Looks like it could be a bug or a feature, depending on your perspective. I may raise it as a bug and let someone else decide.