# Bug: Anki Deletes most/all of my IO clozes when modifying occlusion positions

**URL:** <https://forums.ankiweb.net/t/bug-anki-deletes-most-all-of-my-io-clozes-when-modifying-occlusion-positions/46524>\
**Category:** Help\
**Created:** [June 27, 2024, 8:52pm UTC](https://forums.ankiweb.net/t/bug-anki-deletes-most-all-of-my-io-clozes-when-modifying-occlusion-positions/46524 "2024-06-27T20:52:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hnvy](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hnvy](https://forums.ankiweb.net/u/hnvy)\
**Post date:** [June 27, 2024, 8:52pm UTC](https://forums.ankiweb.net/t/bug-anki-deletes-most-all-of-my-io-clozes-when-modifying-occlusion-positions/46524/1 "2024-06-27T20:52:23Z")

</div>

Hello

A truly devastating bug!

At first, I thought I have accidently deleted a handful of occlusions by clicking the wrong key when modifying an IO card.

But then, I re-traced my steps, and noticed that it is indeed a bug.

I was only able to reproduce it with this card. I tried reproducing it with the other IO cards, but I couldn’t…

```auto
Version <U+2068>24.06.2 (33a92379)<U+2069>
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Windows 10

```

Some facts about the card:

- Created on 2024-05-24
- Here is the content of the field (I have lost some clozes):

```auto
{{c2::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}<br>{{c1::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}<br>{{c13::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}<br>{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}<br>{{c9::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}<br>{{c3::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}<br>{{c5::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}<br>{{c12::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}<br>{{c6::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}<br><img src="paste-Image.jpg">

```

- Here is the content of the slfld

```auto
{{c2::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}{{c1::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}{{c13::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}{{c9::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}{{c3::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}{{c5::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}{{c12::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}{{c6::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}

```

Have a look at the GIF below (notice how, just after moving the boxes, the clozes disappear completely):  
 ![IOBug](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/3X/8/5/857160b6008dbb6020d3e6c15b105038f0fd7038.gif)

---

<div class="post-metadata">

**Author:** ![hnvy](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hnvy](https://forums.ankiweb.net/u/hnvy)\
**Post date:** [June 27, 2024, 9:08pm UTC](https://forums.ankiweb.net/t/bug-anki-deletes-most-all-of-my-io-clozes-when-modifying-occlusion-positions/46524/2 "2024-06-27T21:08:06Z")

</div>

After some tinkering around, I can see that these

These specific positions are troublesome. Try pasting them into their respective columns in the `collection.anki2` database.

You will get the same results.

Make sure you have an image (inside your media folder) with the name `paste-Image.jpg`.

I have even tried the following (cloze numbers ordered):

## flds

```auto
{{c1::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}<br>{{c2::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}<br>{{c3::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}<br>{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}<br>{{c5::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}<br>{{c6::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}<br>{{c7::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}<br>{{c8::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}<br>{{c9::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}<br><img src="paste-Image.jpg">

```

## sfld

```auto
{{c1::image-occlusion:rect:left=.0476:top=.298:width=.0744:height=.0414:oi=1}}{{c2::image-occlusion:rect:left=.0714:top=.0207:width=.0506:height=.029:oi=1}}{{c3::image-occlusion:rect:left=.7292:top=.7492:width=.1786:height=.029:oi=1}}{{c4::image-occlusion:rect:left=.5417:top=.4387:width=.0685:height=.0248:oi=1}}{{c5::image-occlusion:rect:left=.7143:top=.5836:width=.131:height=.0207:oi=1}}{{c6::image-occlusion:rect:left=.2589:top=.1697:width=.052:height=.0312:oi=1}}{{c7::image-occlusion:rect:left=.5685:top=.4677:width=.0655:height=.0207:oi=1}}{{c8::image-occlusion:rect:left=.7589:top=.6705:width=.0982:height=.0248:oi=1}}{{c9::image-occlusion:rect:left=.5855:top=.4936:width=.0744:height=.0248:oi=1}}

```

---

<div class="post-metadata">

**Author:** ![dae](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/dae/32/65_2.png) [@dae](https://forums.ankiweb.net/u/dae)\
**Post date:** [June 28, 2024, 8:14am UTC](https://forums.ankiweb.net/t/bug-anki-deletes-most-all-of-my-io-clozes-when-modifying-occlusion-positions/46524/3 "2024-06-28T08:14:24Z")

</div>

Thanks for the report; I’ve logged this on [Bug: Anki Deletes most/all of my IO clozes when modifying occlusion positions · Issue #3267 · ankitects/anki · GitHub](https://github.com/ankitects/anki/issues/3267). To make it easier to look into, it would be great if you could:

- Restore a backup into a new profile, from before the clozes were lost
- Export the problem note into an .apkg
- Confirm that the same steps still trigger the issue
- Rename to .zip and upload to the linked issue above

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [July 28, 2024, 8:15am UTC](https://forums.ankiweb.net/t/bug-anki-deletes-most-all-of-my-io-clozes-when-modifying-occlusion-positions/46524/4 "2024-07-28T08:15:20Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
