Protected fields not saving

Made a post 18 days ago with this issue. Since then, I updated ankihub addon and I believe the issue is still here.

This is in regard to nid:1584830904713

My last review of this card was 17 days ago where the field was protected and my changes were saved (the field was protected for at least 1-2 months before it got reset - I am 100% confident that this field was correctly protected). I updated ankihub around 15-20 days ago as well (I cant remember if it was before or after I reviewed this card). When I reviewed this card last, the text field was protected, and the protected field tag for the text field was present (I added the protected field tag manually by right clicking → protect fields → text, as I made this change before ankihub started automatically protecting fields). Today, when I reviewed the card, the protected field tag is no longer there, and the change I made in the text field is also not there anymore.

I was wondering if you see anything helpful in the logs.

Logs: ankihub_addon_logs_jkogut_1792800027.log

Thinking

Search
Found 0 results for ‘tags:official Protected fields not saving category::person_raising_hand: Support order:latest_topic max_posts:10 status:open’

Thanks for the extra detail, that helps narrow things down.

From what you’re describing, there are two separate issues that matter for this note:

  1. The field lost its “protected” status (protected field tag disappeared).
  2. The local changes you’d made to that field are gone.

Because I can’t see the actual log file (ankihub_addon_logs_jkogut_1792800027.log) from here, I can’t definitively say what happened, but here’s what is most likely and what I’d suggest checking next.


What likely happened

A few scenarios could explain this:

  1. Protection state was reset by a change in the add-on / sync state

    • Older notes where the field was manually protected (via Right click → Protect fields → Text) might have had their protection state re-evaluated when:
      • AnkiHub add-on was updated, or
      • The deck/template or mapping of fields changed, or
      • You resubscribed / updated the AnkiHub deck in a way that touched note types.
    • If the add-on no longer “sees” that field as protected for that note type (or something about the mapping changed), the previous protection flag can effectively be lost, and then the next sync from AnkiHub can overwrite your local edits.
  2. A server-side update overwrote your local change after protection was lost

    • Once the field was no longer considered protected for that note, any subsequent update to that note from AnkiHub (e.g., card content change pushed by maintainers) could overwrite your local content for that field.
    • That would produce exactly what you’re seeing:
      • Protected tag gone
      • Local edits reverted to the “official” content
  3. Per-note vs per-template protection confusion

    • Protection is usually set per field name on a note type (or deck) level, but there can be confusing edge cases when:
      • The same note type is used across several decks / cards.
      • The note was temporarily using a different template or got migrated.
    • If the protection status was changed at the template level in a patch, it might not match your previous manual setting anymore.

What you can check on your side

  1. Confirm the current protection settings for that note type and field

    • Open the note with nid:1584830904713.
    • Right‑click on the card → AnkiHub: Protect fields.
    • Check if Text is currently shown as protected for that note.
    • Also check another note of the same note type to see if Text is protected consistently.
  2. See if the note was recently updated from AnkiHub

    • In the note’s history (Anki → Browse → select note → right‑click → Show Info), check if there’s a recent modification time that matches when you think the update came in.
    • If you see a change around the time the field reverted, that is a strong hint that a server push overwrote your local changes after protection was lost.
  3. Reapply protection now

    • For now, re‑protect the Text field:
      • Right click card → Protect fields → tick Text.
    • Make a small, recognizable change in that field (e.g., add TEST_PROTECT_1).
    • Sync AnkiHub and then:
      • Restart Anki.
      • Sync again.
      • Confirm that:
        • The field is still marked protected.
        • The TEST_PROTECT_1 text is still there.

    This will help determine if the problem is ongoing, or if this was a one‑time transition issue.


About the logs

Because I don’t have direct access to ankihub_addon_logs_jkogut_1792800027.log, I can’t read what the add‑on recorded for that specific note. However, the AnkiHub team can:

  • Look for lines mentioning:
    • nid=1584830904713
    • Anything like skipping protected field, field unprotected, or note updated from server.
  • Verify whether:
    • The field was interpreted as protected at the time of sync, and
    • Whether a deck update overwrote your local field.

If you haven’t already, I’d suggest:

  1. Attach the log file directly in that topic if possible (or confirm that it’s already attached and clearly referenced).
  2. Add these extra technical details for the team:
    • Exact note type name.
    • Deck name.
    • Whether you changed note types / card templates around the time this began.
    • Whether you unsubscribed/resubscribed to the AnkiHub deck at any point in the last ~2 months.

Those details make it much easier for the AnkiHub devs to reproduce and to correlate the log entries with the server‑side history of that note.


Summary / Next steps

  • Re‑protect the Text field on that note type and confirm that new edits are now preserved across syncs.
  • Check note history around when the change was lost.
  • Provide the extra note‑type/deck info together with the log in your topic so the AnkiHub team can:
    • Inspect the logs for nid:1584830904713
    • Check for any regression in how manually protected fields were handled across the add‑on updates from about 17–30 days ago.

If you’d like, you can paste a short excerpt of the log that contains 1584830904713 into the thread (redacting anything sensitive), and I can help you interpret what it likely means in terms of protection vs overwrite behavior.

The logs show some notes that were overwritten recently, but no protect tags on these notes.

The add-on keeps some older log files that might reveal something (these are not uploaded automatically). Could you go to the ~/Library/Application Support/AnkiHub folder, copy and upload any .log files you find there? If you can’t attach the files here, you can quickly upload them to https://gofile.io/ and post a link.

Also, have you ever used the Protect Fields dialog with multiple notes selected recently?

Thanks for the reply!

Hmm yeah I see that. But those ones being overwritten could’ve just been regular updates from AnkiHub, right?

I attached a zip folder with all the ankihub logs that I have (6). It seems like the oldest one is from September 24th.

No I haven’t. I’ve used the protect fields dialog in the past, but I haven’t used it for multiple notes selected at the same time. Currently, I just let it automatically tag the card, click off the field, and verify that the tag gets added.

In ankihub.log.2 nid:1584830904713 gets overwritten - this lines up with when the change was accepted on AnkiHub. I’m just not sure where to look to see a list of my protected cards in the logs to see where it got lost.

Yes, but they had edits and no protect tags at that point. Something else must have removed the tags before the sync if they had any (probably the Reset option in the August release of the add-on, as it used to remove protection tags).

The logs show that the Text field got overwritten but there’s no clear indication about what caused that, except that I noticed you were on the 2026-08-27.1 release of the add-on at the time, which had the issue with the Reset option: Protected field not saving - #7 by abdo.nh

Ah I see. Thank you for looking into that. This must’ve happened just before I updated AnkiHub to the new version :confused:

I thought I got it this time, oh well. Will keep an eye out to see if anything else changes in the future.