ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.41k stars 2.19k forks source link

[BUG]: Card does not display all fields in the normal section where you rep, only in the card viewer from browser mode. #16766

Open ClaytonRefold opened 2 months ago

ClaytonRefold commented 2 months ago

Checked for duplicates?

Does it also happen in the desktop version?

What are the steps to reproduce this bug?

  1. Download this deck
  2. Unpack it into AnkiDroid
  3. Go to the first card
  4. Flip the card
  5. Go to the card browser
  6. Look at the preview

Expected behaviour

The back of the card should have additional fields.

Actual behaviour

The back of the card is missing fields.

https://github.com/user-attachments/assets/dd565f29-38c5-4814-903b-3091cbce111e

Debug info

Occured on most recent version of Anki droid on multiple Android devices.

(Optional) Anything else you want to share?

I posted about the bug and discussed it with David A in discord.

Discord user jorge_baboy

Research

welcome[bot] commented 2 months ago

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

toppsdown commented 1 month ago

Found a workaround. Apparently the issue is caused because there's a script tag in a div. Everything after the script tag gets ignored by AnkiDroid.

Fixed by moving all scripts to the end of the file.

MrPropre84700 commented 1 month ago

Found a workaround. Apparently the issue is caused because there's a script tag in a div. Everything after the script tag gets ignored by AnkiDroid.

Fixed by moving all scripts to the end of the file.

i tried it but it dosen't work, my scripts are in the end of the front and the back whithout div tag. Does it work for you @ClaytonRefold ?

MrPropre84700 commented 1 month ago

In my case ankidroid doesn't recognize an id tag

MrPropre84700 commented 1 month ago

Hey,

I found what is the problem but not the solution. Ankidroid does not recognize the tag "id" which is used in the back and re-used in the front. Yet on computer or in ankidroid prewiew it works.

An example : Here is a script to write the answer and display it on the back:

FRONT :

(here i capture the id value of "typeanwser" for the back) BACK: but it's workd on review mode ? it's strange.