Steps to replicate the issue:
- Create campaign with this category: https://commons.wikimedia.org/wiki/Category:Turkey_photographs_taken_on_2020-06-14
- Navigate to this image: https://commons.wikimedia.org/wiki/File:Natural_Life_Park.jpg (which has depicts = 'some value')
- Make sure the previous image you were on has some statements, if not just refresh the page to generate a new order of images
- Add any statement so the cancel button is active
- Click cancel
What happens?:
This prevents the list of initial depicts statements from being generated, but that leaves it in the same state it was for the previous image.
After cancelling, the statements will revert to those on the previous image.
What should have happened instead?:
When loading the new image, the initial state should be saved even if any error occurs.
Technical info:
There's an uncaught exception on line 102 in populate.js when the image first loads:
item: depictStatement.mainsnak.datavalue.value.id
This prevent it from finishing the usual sequence of steps to initialise the new image.