Random card transfers when changing deck structure

Random card transfers when changing deck structure

I discovered a persistent and hard-to-track bug a long time ago, and although I don’t know how to reproduce it consistently, I’ll describe the scenario in which it has appeared several times over the last 4 or 5 releases. I suspect it may also appear in the next release.
The core of the issue is that when I manipulate my decks, at some point some cards randomly get transferred into other decks for no clear reason.

Here’s what happened: I had a nested deck structure four levels deep, with the actual cards residing at the lowest level. The card types had automatic deck reposition enabled.


For my own reasons, I needed to add another level of hierarchy and move cards between decks.

I created the new decks in the root via the main window and then dragged them with the mouse to the desired position in the tree.

Next, I updated the automatic deck reposition settings to point to the new decks.

After that, I started transferring existing cards into the new decks. I opened the browser, sorted the cards by card type, selected the relevant entries, and assigned a new deck via the context menu.

But at some point, I noticed that, for example, some Infinitiv cards that I had already moved earlier were now showing up in Union. Not all of them. Just a seemingly random portion.

A year ago, when I first started using Anki, I thought I had made a mistake. But over the past year, as I refined my deck structure, I’ve encountered this behavior multiple times.

My database isn’t very large: around 2,200 notes and 9,500 cards in total. At the moment of the changes, there were no empty cards, and the database had passed validation successfully.

Perhaps the problem is somewhere in the indexing phase (if there is such a process), when I start a new move before the previous move is finished. Although the time to move from one sample to another is minutes. I am human after all.
Perhaps there is some sort of index overflow going on at some point. I don’t know…

If you’ve been seeing this for a long time, it’s not related to the release currently in beta testing – so I moved you to your own topic.

By this, do you mean Deck Override?

Not what you asked about, but Decks might not be the best organizational structure for you. Unless you are almost always studying those subdecks separately from each other, you might be better off avoiding all of this and using Tags instead. Adding/Editing - Anki Manual

By this, do you mean you ran Check Database? If not, you should do that.

  1. Are you sure that you were looking at the Browse window in Cards mode – when making those moves, or when looking at the deck later?

  2. I’m not aware of there being any significant delay between when you move cards and when the database reflects the cards’ new deck. If something was causing a delay, I think your window would show “Processing” and you wouldn’t be able to proceed when it was done.

  3. How are your syncing habits? Are you strict about making sure that you sync when you open the app and when you close/leave the app, on every device, every time? If you move the cards on one device, and then without syncing first, you make some other change to the notes/cards on another device, you can end up with cards in their “most recent” state, but not where you want them. You should make sure that you don’t have changes/edits/updates happening on 2 separate devices at the same time (and that includes changes that add-ons might be making in the background).

Yes

For studying, I always select only the top-level “Deutsch” deck and never the subdecks individually. The subdecks are merely filters that I use to manage the addition of new cards/day (Not frequently, but roughly once a quarter, something might change.) and to view statistics.

Yes

I’m 100% sure.

Sounds reasonable, but since I don’t know what’s under the hood, I just shared my assumption.

All studying and card reviewing happens 100% in AnkiDroid. The desktop version is used solely for database administration.
However, in a year of use, I can’t recall a single day when I didn’t make at least a minor change to the database.
As a result, synchronization happens at least 10 times a day — at the very least to sync the changes calculated by FSRS Helper.
But even aside from that, I always sync the data before making any changes.

Sorry, I missed your response!

It isn’t so much how often the syncing happens – it’s when it happens in relation to the changes that are made.

As an aside: If you’re using current/recent versions of Anki on all your devices, you probably don’t need the Helper add-on’s “on sync” actions anymore.

That’s all the things I can think of to check. It sounds like this happens sporadically, which makes an issue really hard/impossible to track down. If you find it happening consistently, in a reproducible way, let us know.