hgiesel / closet

The Web Framework for Flashcards
https://closetengine.com
GNU General Public License v3.0
65 stars 6 forks source link

Basic closet features no longer works #29

Closed seyakim closed 4 years ago

seyakim commented 4 years ago

I followed along, and made closet cards with closet/asset manager per your video tutorial 3+ weeks ago. I revisited it today and updates seems to have broken basic functionality. for example, a very basic cloze syntax " [[c1::...]] isn't working.

I basically tested this by making a copy of the Commands sample deck. I tested that both Commands and Commands copy work before updating Commands copy with the asset manager button Write to Templates.

hgiesel commented 4 years ago

I'm sorry to hear this!

I don't really know what could have caused this. I have two suggestions:

Suggestion 1

  1. You download the AnkiWebView Inspector
  2. Open a card which doesn't work in the reviewer, right-click on the card, and select "Inspect". This will open a tab to the right.
  3. In this tab, select "Console", however usually it is automatically selected.
  4. Look for an error message. If there is none, try typing in initCloset() and click enter, and see if there is now an error message
  5. Take a screenshot of the error (or absence of it), and upload it here.

Suggestion 2

  1. You put cards (however many you like), and put them into a new Anki Deck.
  2. You export it by finding it on the main screen, clicking on the small right wheel next to it, and choose "Export"
  3. As Export format choose "Anki Deck Package", uncheck "Include scheduling information", check "Include media".
  4. You will get a file with the ending ".apkg". Upload this file here.
seyakim commented 4 years ago

followed your suggestion 1: initCloset is not being called per instance of the cards. manually calling it in the console makes it work. am i missing something egregiously simple here?

i did notice that asset manager now writes the closet source code to an external document. although i did try changing it to writing directly to card and vice versa.

hgiesel commented 4 years ago

Yes, Closet by default is now written to an external document.

You can change this by going to "Tools > Manage note types > Assets... > Closet > Insertion Position".

The problem here was: As External Document has much better performance, however if you want to use MathJax in combination with Closet (Closet tags inside of Mathjax), you have to use Into Template. This sadly is a limitation (one that I'm trying to solve however). I figured that the performance was more important, which is I why switched the default to As External Document.

Theoretically both should work however.

hgiesel commented 4 years ago

If you still need help, please reopen the issue.