The flags are gone

I don’t know when or how it happened. Version 35.

Version 2.1.54 is the latest version. When you say the flags are gone, do you mean your cards have lost their assigned flags?

yes i mean exactly that

Firstly, I would suggest updating to a more recent version - if it is a bug with Anki it’s likely to have since been fixed.

Open the browser and check that the flags are actually gone, and aren’t just not displaying during study. I’d also take a look through your notes to look for any other unexpected changes.

If there’re definitely gone, I’d also suggest backing up your collection before taking any of the following steps.

You can likely get them back by restoring an automated backup. Since this will cause you to lose progress, depending how far back you need to go, I’d restore the backup into a new profile, and copy the flags across.

If it’s a small number of cards it might be best to just copy them across manually.

If it’s a large number of cards, the following procedure might work for you:

  • In the browser, select all the cards of each flag type and add a tag to each of them (e.g. red_flag).
  • Switch to note view, select all the notes you just tagged, and export them (without scheduling)
  • Import those cards to your main profile, updating the affected notes to add the tags
  • Select the cards in the browser and add the flags

The disadvantage of this approach is that you can only tag notes, not cards, but I don’t know a way to update cards with flags.

Alternatively you could delete the affected notes from your main profile and replace them (and only them) with imported cards from the backup. You’d lose any reviews since the backup, but only on notes with flagged cards.

If you can provide more information about how this might have occurred, what addons you’re using, your platform, and anything else relevant, it’s possible there’s an easier way to fix this, but if the data is gone using a backup would likely be the only way.