Page MenuHomePhabricator

Handle stories containing deleted files
Closed, ResolvedPublic

Assigned To
Authored By
SBisson
Jul 26 2022, 2:15 PM
Referenced Files
F35490740: image.png
Aug 26 2022, 7:16 AM
F35490738: image.png
Aug 26 2022, 7:16 AM
F35490731: image.png
Aug 26 2022, 7:16 AM
F35490729: image.png
Aug 26 2022, 7:16 AM
F35490734: image.png
Aug 26 2022, 7:16 AM
F35396740: Frame 24.png
Aug 4 2022, 3:36 PM
F35396365: story page 2.png
Aug 4 2022, 3:05 PM
F35396356: story page.png
Aug 4 2022, 3:05 PM

Description

Background

Stories use images from the commons. In some situations, images on Commons can be reomoved. We don't have any treatment for handling stories containing deleted files, and this ticket aims to propose solutions for handling such stories.

Story: https://id.wikipedia.org/wiki/Story:Afrika_Selatan,_Negara_Paling_Selatan_Benua_Afrika
Deleted file: https://commons.wikimedia.org/wiki/File:Nelson_Mandela_statue,_Union_Buildings_01.jpg
Deletion log: https://commons.wikimedia.org/wiki/Commons:Deletion_requests/Files_in_Category:Nelson_Mandela_statue,_Union_Buildings

Design

Discovery section

  • Don't show story thumbnail attached to an article when all images of a story got deleted on commons.
  • Show story thumbnail attached to an article when one or more images of a story got deleted on commons.

Story viewer

en.m.wikipedia.beta.wmflabs 4.png (900×480 px, 101 KB)
  • Show a black background for story pages whose images are missing.
  • Show story text as it is available for black background story page.
  • Don't show any image licensing information on black background story pages.

Story builder

Frame 24.png (900×480 px, 134 KB)
  • Show deleted images as a blank frame.
  • Allow editors to replace images to select new one.
  • Rest other functionality works as expected.

Story page

story page.png (780×360 px, 43 KB)
story page 2.png (780×360 px, 149 KB)
  • Show all story pages.
  • Show a black background for story pages whose images are missing along with their text.
  • Show an error message at first followed by story pages.

Notes

  • Proposed error copy on a story page might change based on the feedback.
  • We might explore how to inform story editors about stories containing deleted files in a separate task.

Design file

Related Objects

Event Timeline

Change 820543 had a related patch set uploaded (by Sbisson; author: Sbisson):

[mediawiki/extensions/Wikistories@master] Keep rendering despite missing file

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

Change 820543 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Keep rendering despite missing file

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

SBisson triaged this task as High priority.Aug 10 2022, 1:09 PM

Change 822445 had a related patch set uploaded (by Eamedina; author: Eamedina):

[mediawiki/extensions/Wikistories@master] Handle stories containing deleted files

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

Change 822445 merged by jenkins-bot:

[mediawiki/extensions/Wikistories@master] Handle stories containing deleted files

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

I would like to test this by uploading a file, creating a story from it and then deleting the file from Commons. I will reach out to know how to go about this.

Tested and passed.

  1. Deleted images show as a black background with no attribution.

image.png (1×980 px, 97 KB)

  1. In edit mode, this shows as a white thumbnail that can be repositioned.

image.png (1×972 px, 189 KB)

  1. Story cannot be saved with this missing image.

image.png (1×970 px, 192 KB)

  1. A warning is displayed in the Story edit page on Wiki to inform the user about the missing image.

image.png (1×1 px, 1 MB)

  1. The story cannot be saved with this file missing.

image.png (1×2 px, 363 KB)