No-cloze mode no longer works on AnkiDroid
Closed this issue · 4 comments
Hi. First of all thank you so much for developing this addon.
Background
Since a couple days all my Enhanced Cloze cards that do not actually contain clozes (i.e. "No cloze" mode) stopped working on AnkiDroid, even older cards that I have created in the past. The only culprit I can think of is an update to Anki itself; AnkiDroid hasn't been updated since last year and the latest version of the addon used to work on AnkiDroid just fine. Nonetheless, I'm sure the developers have a better understanding of how everything works internally.
Some (potentially) useful info
- Anki on Desktop: Version 2.1.61 (0c1eaf4c), Python 3.9.15, Qt 6.4.2 PyQt 6.4.0
- AnkiDroid: Version 2.15.6 (July 14 2021)
- Enhanced Cloze: Version 2022-11-15
Screenshots
During review; AnkiDroid complains and says there are no clozes
The "Check Empty Cards" function; AnkiDroid finds no empty cards (implying that it did indeed find and recognize the "dummy" clozes for the "No cloze" cards)
Oddly enough, when AnkiDroid prompts me to check for empty cards, it comes up with nothing, which means that for some reason AnkiDroid now looks at fields that would actually be displayed (which does not include the cloze99
field). If the card is being reviewed, it assumes it's empty, but when using the "Check Empty Cards" function, it finds the cloze (that is not displayed on the card) and reports no issues.
However, as already mentioned, AnkiDroid hasn't been updated for almost a year and I haven't changed any settings as of late, so I can't think of any reasons other than the update to Anki may have changed some behaviour relevant to this issue.
Let me know if I can be of any help, and once again thanks a ton for the amazing addon!
@AlyMoh Thanks for the detailed report!
The only culprit I can think of is an update to Anki itself;
I think you're right, even if I'm not sure how the Anki update can affect the detection of empty clozes on AnkiDroid.
Fortunately it seems that the problem can be fixed by adding {{cloze:Cloze99}}
to the card template (and making it invisible) - I just tested that. I'll probably release an update that solves this issue in the coming days.
@RisingOrange No problem at all, happy to help! I'm assuming, per your reply, that you can reproduce the issue.
Let me know if you'd like my help testing the fix or further info on the issue. And thanks for your time with the addon!
Just tried out writing the fix myself. @RisingOrange If you'd like I can create a pull request for you to approve.
I admit it's not exactly the cleanest of fixes, but it should get the job done.