Page MenuHomePhabricator

Duplicate and mixed diff content when switching from Visual to Wikitext in multi-content diffs and commons
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

There are some circumstances when switching from Visual to Wikitext diff will lead to duplicate diff content or showing both the inline and wikitext diffs on the same page.

I have only been able to reproduce this on multi-content diffs and on commons.

Steps to reproduce problem

Case one:

  1. https://commons.wikimedia.org/w/index.php?title=File%3ATamar_Class_Lifeboat_with_Y-Class_Showing_Photo_By_Robert_Kilpin.jpg&diff=680321681&oldid=17716809&diff-type=inline
  2. Click the inline toggle to switch to two-column mode
  3. Switch to "Visual"
  4. Switch back to "Wikitext"

Expected behavior: You see a wikitext, two-column diff
Observed behavior: You see both two-column and inline diffs and two duplicate "mediainfo" sections

Case two:

  1. https://commons.wikimedia.org/w/index.php?title=File%3ATamar_Class_Lifeboat_with_Y-Class_Showing_Photo_By_Robert_Kilpin.jpg&diff=680321681&oldid=17716809&diff-type=table
  2. Click the inline toggle to switch to inline mode
  3. Click the inline toggle again to switch back to two-column
  4. Switch to "Visual"
  5. Switch back to "Wikitext"

Expected behavior: You see a wikitext, two-column diff
Observed behavior: You see two duplicate "mediainfo" sections

Case three:

  1. https://commons.wikimedia.org/w/index.php?title=Commons%3AAccount_creators%2Far&diff=689132041&oldid=285904457&diff-type=inline
  2. Click the Inline toggle to switch to two-column mode
  3. Switch to "Visual"
  4. Switch back to "Wikitext"

Expected behavior: You see a wikitext, two-column diff
Observed behavior: You see both inline and two-column diffs

Environment

Browser: Firefox 102. Chromium 116.
Wiki(s): https://commons.wikimedia.org MediaWiki 1.41.0-wmf.26 (f511adf) 00:18, 12 September 2023.

Screenshots

Example with inline and two-column diff shown at the same time:

duplicate_everything.png (3×1 px, 659 KB)

Example of duplicated "mediainfo" sections:

duplicate_mediainfo.png (3×1 px, 587 KB)

Example of inline and two-column diff on the same page:

inline_two-column_same_time.png (904×1 px, 172 KB)

QA Results - Beta Commons

Event Timeline

dom_walden renamed this task from Duplicate and mixed diff content when switching from Visual to Wikitext in multi-content diffs to Duplicate and mixed diff content when switching from Visual to Wikitext in multi-content diffs and commons.Sep 14 2023, 7:18 AM
dom_walden updated the task description. (Show Details)
dom_walden updated the task description. (Show Details)

Another bug, likely related:

Expected behaviour:

  • Shows the inline diff you saw originally on page load

Actual behaviour:

  • No diff is visible at all

Screenshot from 2023-09-19 13-11-55.png (680×1 px, 131 KB)

Change 960152 had a related patch set uploaded (by HMonroy; author: HMonroy):

[mediawiki/core@master] Fix inline/table format mixed toggling

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

Change 960152 merged by jenkins-bot:

[mediawiki/core@master] Fix inline/table format mixed toggling

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

Change 960154 had a related patch set uploaded (by Bartosz Dziewoński; author: HMonroy):

[mediawiki/extensions/VisualEditor@master] Fix wikitext mixed toggling

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

Change 960154 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fix wikitext mixed toggling

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