The template for the front has a problem. ‘{{FrontSide}}’ found, but there is no field named ‘FrontSide’. This only occurs with the card type legal question. I have not created my own kind of cards.
The deck author appears to have made a mistake. Please tap on the gear/cog during study, then scroll down and tap on Card Template. Locate {{FrontSide}} in the front template and remove it, and that should fix all cards with that template.
Thank you. Before I do something wrong now. Should I just remove the words front side or the whole paragraph (if(“{{FrontSide}}”==“”||“{{FrontSide}}”==“{unknown field FrontSide}”){var injectScript=(src)=>{return new Promise((resolve,reject)=>{const script=document.createElement(‘script’);script.src=src;script.async=!)
I’m pretty sure i know this particular note type (it is called “Fragenfolge”). I also think that your screenshot shows an old version of that note type, which has since been updated by the author.
Instead of deleting that part of the note template, you might want to try to update the note type to the newest version, and see if this fixes your issue. For instructions, see the authors page. You will need the desktop version of Anki to install the mentioned add on.
Before doing so, you might want to create a backup of your collection by exporting it.
this is one of my Jura-Vorlagen note types which are used by a few thousand people to study for their law exams.
You probably don’t remember, but a few years ago we discussed whether it should be possible to use {{FrontSide}} on the front side of a card. I argued to keep this option with the following argument:
By checking if “{{FrontSide}}” is equal to an empty string you can determine in JavaScript if you are currently displaying the front side or the back of the card. I used this to make sure I don’t run certain formatting scripts twice. That would otherwise happen if you use {{FrontSide}} on the back of the card.
After the AnkiDroid team continued to support this I was under the impression that you were fine with this. I probably should have confirmed this with you.
Would you consider allowing this again in the next version or should I focus on updating this as soon as possible? Even if I do that I think there will be many questions and frustrated or confused users because of this issue.
Sorry, I had forgotten that discussion. I wish I had pushed you to change your approach back then, as testing the contents of FrontSide is a bit of a hack, and makes the template text longer than it needs to be. But as this is already in the hands of thousands of users, I’ll revert the change in the next update to minimize further disruption. It will take about a week to get into the hands of users I’m afraid.
As a way of avoiding this in the future, couldn’t you do something like wrap the question and answer template in an outer div with class=question/answer, and check which class is set?
First of all, a sincere thank you, Damien, for your fast reaction. This will probably help out quite a few people, so in their name a big thank you!
Now, after I looked into this more it seems that I actually did remove this code in the later versions to be on the safe side. This means that only people with older versions who did not update their note types will be affected (which are probably also quite a few people). @Hildeguard, you were right.
While I remembered that we talked about this I did not remember that I actually fixed it later on. Sorry for that!
For users like @Helena this means that if you update to the latest version, the error should disappear. For this you need to install my Butler-Addon (only available for the desktop versions of Anki, i.e. Windows, macOS, Linux).
After installing it and restarting Anki you should get the required updates.
To make sure everything worked as intended please click on Butler-Addon > Jura-Vorlagen > Ausführliche Prüfung der Jura-Vorlagen.
Apple approved the update this morning, and it will be rolling out over the next week. You can visit the app store page if you want to grab it immediately.