[SOLVED] AnkiHub-Sync resets notetype settings

Duplicating for visibility and more clearly defining the issue at hand.

@andrew @jakub.f
Seems to be directly related to the last AnkiHub-Add-On update from 2024-06-10.

Since this update, every AnkiHub sync that includes updates (i.e. accepted suggestions) resets the local notetype to the notetype saved in AnkiHub (Front HTML, Back HTML and Styling).
This only affects the notetype, not the fields that are protected through AnkiHub.

As the notetype saved in AnkiHub cannot be changed, this causes massive issues in the form of removal of JS-functions introduced later as well as resetting any and all customization work that has been done.

This affects at least ~1k AnkiHub users of the German Anki Ecosystem.

Replicating from original thread:

At least for our German Anki Project (@Projekt_Anki_Germany) this is a breaking issue, due to problems with our notetype we originally uploaded to AnkiHub (and can’t change after the fact).
These issues can be fixed using our notetype add-on, however, this is a giant problem for some of our users with more extensive custom work (as effectively every accepted suggestions results in having to re-do one’s customisations).
Idk why this happens, as AnkiHub should never overwrite custom notetype settings (and afaik know was never designed to do so)
[idk about your AnKing notetypes addon, but due to it using the same general codebase for customization this issue should also affect you]


Found the problem in the new _update_templates_and_css() function (from main/importing.py) which exclusively respects the AnKing-Notetypes-AddOn and forces users of other deck ecosystems (i.e. the German ProjektAnki one) to return to the notetype settings of old.


Quick fix proposal: modify settings.py





and modify:

def is_anking_note_types_addon_installed():
    addon_dir_names = [x.dir_name for x in aqt.mw.addonManager.all_addon_meta()]
    return (
        str(ANKING_NOTE_TYPES_ADDON_ANKIWEB_ID) in addon_dir_names
        or str(PROJEKTANKI_NOTE_TYPES_ADDON_ANKIWEB_ID) in addon_dir_names
        or ANKING_NOTE_TYPES_ADDON_MODULE_NAME in addon_dir_names
        or PROJEKTANKI_NOTE_TYPES_ADDON_MODULE_NAME in addon_dir_names

and in main/importing.py in _update_templates_and_css() modify the following:

        use_new_templates_and_css = not (
            ("anking" in remote_note_type["name"].lower()
            or "projektanki" in remote_note_type["name"].lower())
            and is_anking_note_types_addon_installed()

EDIT: tested locally and confirmed working (the logic should be obvious)

We are working on it! We will release a fix for this today.

Besides introducing the change you suggested, we can also update your note type on AnkiHub, so that subscribers get the new version of the note type, even if they don’t have your note types add-on installed. What do you think?

1 Like

That would be perfect! Is this possible to do via the frontend or do you have to change it server-side?

Great! We’ll have to change it server-side for now, but we are considering giving deck maintainers an option to adjust note types.

Should I just the newest note type versions that are available through your note types add-on?

1 Like

An option for the maintainers to adjust notetypes would be perfect! (consider this a feature request :wink:)

Yeah, I think it’s best if you just use the newest version of the notetypes available through the add-on.

Current versions of the notetypes are here: notetype-addon/src/projekt_anki_notetypes/note_types at main · ProjektAnkiBVMD/notetype-addon · GitHub
Ankizin (our main deck) uses only ProjektAnkiCloze and ProjektAnkiBlickdiagnose

Thank you for the quick response! :smiley:

1 Like

A new add-on version with the fix was released and the note types were updated on AnkiHub!

Unfortunately, many users will probably loose their note type customizations when they sync before they update the AnkiHub add-on. However, the note types won’t be broken (since they will be updated to the newest version), and the customizations won’t be reset after they configure them again.

1 Like

We apologize for causing these problems!

That’s great to hear. Again, thank you!

I’ll communicate that small caveat, hopefully won’t be a huge problem!

1 Like

Just checked the deck using a new profile: server-side updating of the notetype looks great :+1:


Can you clarify what steps I need to take to ensure that the ‘timer config’ issue doesn’t keep reverting to 9s every time I sync between devices? I first noticed the issue last night, and it was still happening this morning.

However, I did note there was an AnkiHub update that was released sometime between last night and this morning, so I updated and restarted Anki. Is this all I need to do in terms of addressing this issue?

Yes, you need the new add-on version, but that’s not sufficient by itself.

If you want to configure the Projekt Anki note types, you need to install the Projekt Anki Notetypes add-on. Otherwise your customizations will be removed when you sync with AnkiHub.

For configuring AnKing note types you need the AnKing note types add-on, for the same reason.

Just wanted to come in and say that I am USA based and having this issue as well. I will go ahead and add the Project Anki Notetypes add-on now and see how that helps.

So the above mentioned add on is saving my notetype settings, but could that add on is in german and I am not sure what exactly it is doing or what is the long term plan of it


  • USA → AnKing notetypes add-on
  • Germany → ProjektAnki notetypes add-on

As a quick, but more thorough overview:
The two addons serve the same purpose but for different Anki deck ecosystems.

  • The AnKing notetype add-on is for all decks using the notetypes of the US-based AnKingMed project (e.g. AnKing Step Deck, AnKing MCAT, Dermki etc.)
  • The ProjektAnki notetype add-on is for all decks using the notetypes of the German ProjektAnki project (basically German AnKing; our main deck is called Ankizin)

So depending on what decks you use (which mostly depends on your location), you best use the add-on designed for the specific decks. The ProjektAnki add-on obviously is a German-language add-on, as our users are German/Austrian/Swiss medical students :smiley:

From what I understand, your current issue is with the AnKing notetype add-on not saving any settings.
I think it’s best if you describe your problem in a different thread, to properly allow for the correct support, as this seems to go beyond the scope of this specific discussion.
(This thread right here was just about that one technical issue with the ProjektAnki-AnKing-AnkiHub incompatibility :smiley:)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.