Today, I tried to add a card, but the result was that I got a duplicate. I am pretty confident that the card has nothing to do with any other, pre-existing card, but just trashes an existing card. I have made two screen shots that illustrate the problem, but I have no idea where to start trying to fix it. I have tried “Check Database”, but it did not appear to make anything better. Please look at the number after ‘dupe:’, which is the same for both cards. I am now running Anki 2.1.56-Qt6 on Debian Bookworm.
I’m not at all sure that I understand your answer. Now that the notes are in the database, how do I get them out? In the card/note browser, there are no pins to click. I am also not sure how or why I would have clicked the pin, which I have now seen for the first time, that I have clicked it before (by accident?). In the note browser, I can now see two entries, and both are supposed to have two cards. I have now deleted the newer note and tried to re-add it, but it still ends up clobbering the same note (就), instead of creating a new note. In the ‘Add’ dialogue, I made sure that all the pins were light grey instead of black, so (hopefully) disabled. I’ve tried to add a nonsense card to check whether that would also clobber something, but it didn’t.
Sorry, the part where I suggested that the two cards seem to belong to the same note may be due to a wrong interpretation of your screenshots.
Why do you think that adding a new card results in a duplicate?
If it is because, after adding the card, Anki shows a red background/outline and the Show Duplicates button, it may be due to the first field being pinned.
If that is the case, there is no actual duplicate, yet, and so you do not need to take any measure. That is what my previous answer was about.
But, if I understand it correctly, adding a new card results in some sort of error where the contents of different notes get mixed-up, and/or some old note is overwritten? What do you mean when you say that
I have now deleted the newer note and tried to re-add it, but it still ends up clobbering the same note (就), instead of creating a new note
?
(Also: the number after dupe: represents the notetype, so it is normal that it is the same across different notes)
For some time now, I have noticed that the auto-fill functionality of the Chinese redux add-on is usually working only a few times, and then sort of “stops”, but not really. What it seems to do, is to add the note and then keeps filling the fields in the background, while the add-on dialogue is already “empty” for you to add another card. However, if you go and search the newly added card in the card browser, you’ll usually see the fields being filled “almost correctly”, except that I have modified my card model long ago to include fields that this add-on cannot fill (Wubi etc.). So I tried to add a card for “光阴似箭,日月如梭”, but then found that all the other fields didn’t match this phrase, but instead matched “就”. At this point I searched for “就” and found that the card was still there, intact. In the left side, I can search for tag “duplicate”, which has somehow not been added to the cards, which then brought up both notes with two cards each in the card browser, and with the same note id. I haven’t yet managed to untangle those two completely unrelated entries, and I don’t know how to prevent it.
I see, then the problem seems to lie in the Chinese redux add-on.
By checking its AnkiWeb page (Chinese Support Redux v0.14.2 - AnkiWeb), it looks like the add-on was last updated more than two years ago, on 2021-03-29, so it is well possible it is not fully compatible with newer Anki versions.
Alternatively, there may be some conflict with other add-ons you’re using.
You could do the following:
disable your other add-ons, then restart Anki.
try using the add-on with some older Anki version
(you can have more than one Anki version installed at the same time).
contact the author directly and explain to them the problem you’re facing.
(since the add-on was last updated a long time ago, the author may not be following the project anymore, but it is still worth a try).
Sorry, I misread your first reply. One indication that this is a “duplicate” is that it shows up under the “duplicate” tag, but the real problem is that, although the Hanzi fields are completely different, all the other values, like Pinyin, translation etc. are identical between the two notes. Just the time stamps are different. But if the notes themselves are different, they should not show up under “duplicate”, and if the add-on was unable to fill the fields, they should be blank instead of containing data from a different note. I was unaware that the number after ‘dupe’ was the card type instead of the node ID, but would appreciate help with looking into the database or code to fix this issue.
At this point, I have a similar suspicion, but the author’s website has been disabled, too. However, this would provide some “opportunity” to try to pick up the slack (not that I had too much spare time, but hey).
In theory, Anki considers two notes “duplicates” when they have the same notetype and the content of their first field is the same (even if all other fields are different).
In your case, the situation seems to be the exact opposite.
Maybe there is some hidden field, storing something like an unique identifier? What do you see if you click on the Fields button?
I have deleted the entry, rebuilt the database, and restarted Anki. Now it appears to work.
Indeed, I was having the exact opposite problem of what usually constitutes a duplicate, whereas Anki also usually attaches the “duplicate” tag to such notes. But in this case, it didn’t.