I was editing the CSS of a Basic (and reversed card) deck today.
My process was:
Edit CSS code in the Styling editor.
Click Save button after a sizeable edit.
Occasionally check the card using the Preview button.
Goto 1.
After about an hour, something weird happened, the HTML code in the front and back editors for Card 1 copied over to (ie. replaced) the front and back code for Card 2. I only realised because the preview was showing the question side of each card in the same language.
But I did not do any editing in the HTML template editors. Only the CSS (Styling) editor.
I retrieved my original HTML code from a backup, and that fixed the problem.
I’m trying to understand what happened because I’m convinced it wasn’t due to user error. I was not editing the HTML at all and copy/pasting code from both front and back of one card to the other is not exactly an easy mistake to make.
I try to avoid add-ons. The only ones I use are Review Heatmap and HTML Window source and they have been installed for a couple of years. During that time I have extensively edited the HTML and CSS without issues.
I think only Review Heatmap writes to the database, but I’ve never heard of it causing an issue like this before. HTML Window source doesn’t seem to hook into the Cards editor.
I spent another hour editing the CSS this morning without problems, so whatever caused this problem - I suspect it’s going to be difficult to replicate.
I can’t think of a reason why that would happen, and recent Anki versions should actually refuse to save notetypes with duplicate templates. If you are able to reproduce it again in the future and spot a pattern, please let us know.