Protect tags not always working

Hi all,

I am finding that the “AnkiHub_Protect::Text” or other fields are not always working. Sometimes, when I open Anki and it syncs to AnkiHub, some of my protected fields are still overwritten despite the tag. It doesn’t always happen, and a random number of cards from 0 to 10 are overwritten despite the tags, during each sync. I don’t think there are any similarities between the cards. I can exit the app, open it 6 hours later, and find that there is a chance additional cards will be overwritten.

Here are some Note IDs that have been overwritten despite being protected, note that this is FAR from an exhaustive list since I haven’t been able to keep track of which cards get overwritten. I only happen to know if I am certain I protected the card. 1510261296535, 1532685042863, 1516408630312. I can try to update with tomorrow’s batch of overwritten cards, if any.

Finally someone noted that, Same here. It sucks that you cannot have full control over your cards and they automatically get overwritten, i would say there are many many of them esp those that i merge cloze together they just get back to their original would say up to 20%
Hope the team can make some efforts into it since it matters most.

Can you post a screenshot of a note (shown in the Anki Browser) that has e.g. a AnkiHub_Protect::Text tag and was not protected?

Are you using this dialog to add the AnkiHub_Protect tags to notes? (You can open the dialog by right-clicking a note in the browser and then selecting AnkiHub: Protect Fields.)
I am just wondering because it is easy to make mistakes when adding these tags manually.

There are more details on how to protect fields and tags here: https://www.notion.so/ankipalace/AnkiHub-Documentation-dd8584f3e6c04068ab47e072c17b3a0a?pvs=4#1bb1a310a3f14aacab0cbc22b243f0a6.

1 Like

Here is one of the protected notes that were overwritten with this morning’s sync. You will notice that there is no AnkiHub_Protect::Text tag. The tag was there last night; the protect tags get removed.

Of note, the number of cards that I have tagged to protect was 800 last night. This morning it says 797 cards.

I have not been using that dialog, I will use that from now on and see if anything changes. Though if it were an issue of using the wrong tags, wouldn’t one expect the same card to be overwritten every time I sync with AnkiHub? In my case it does not overwrite every time and not the same cards get overwritten.

I’d look at notes, not cards. Cards can fluctuate if a cloze gets added or deleted. The tag getting deleted is weird

No, because syncing with AnkiHub only overwrites your changes to notes if these notes were updated since the last time you synced (someone made a suggestion and it was merged). If there were no updates to a note since the last sync, the add-on will not modify the note when syncing.
However there is a way to make notes be the same as on the website after you modified trhem without waiting for the next update to the notes - you can reset local changes to notes:
AnkiHub Documentation - Resetting local changes to notes

It’s weird that your changes get overwritten despite the AnkiHub_Protect tags. There is a way to check if the AnkiHub_Protect tag is set up correctly for a note.
You can try to make some changes to a field of a note, then protect the field using a AnkiHub_Protect tag and then try resetting changes to the note (right-click the note in the browser → AnkiHub: Reset local changes). If the field is protected correctly, it should not be reset.
(The same logic for protecting fields is used both when syncing changes to notes and when resetting changes to notes.)
Can you try this and tell me if it works for you?

When you are tagging many notes at once, it might actually be easier to just select the notes in the Anki browser, right-click, click Add Tags and add the AnkiHub_Protect tag to all these notes at once. The reason is that the other dialog (AnkiHub: Protect fields) does not allow you to add tags to multiple notes at once at the moment (which should be probably changed).
Just make sure that the tag is correct and in the correct case.

2 Likes

I checked if the tag is properly protecting the notes using the method you detailed, it seemed to have passed the test. This is after re-adding the AnkiHub_Protect tag to the notes. I will try to post an update in a few days if the notes continue to be overwritten.

3 Likes