fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
178 stars 24 forks source link

"Unsuspend" Button Missing, Unsuspend hyperlink in its place that does nothing #296

Open Meddymatt opened 3 years ago

Meddymatt commented 3 years ago

Describe the bug I frequently use the search bar at the bottom of the addon to search text from books to find related anking cards. Normally once i hit the "suspended" icon on a card i get a pop up that i can scroll to the bottom of and unsuspend the card. But i have been having an issue for a while now where some cards lack the "unsuspend" button at the bottom and in its place is a "unsuspend" hyperlink preceded by a little picture icon.

To Reproduce Steps to reproduce the behavior:

  1. Go to card
  2. Click on "Suspended"
  3. Scroll down to bottom of pop up
  4. See lack of normal unsuspend button, w/ "unsuspend" hyperlink in its place

Expected behavior Normally there is a button that says "unsuspend" within the pop up window

Screenshots image

Environment (please complete the following information):

Meddymatt commented 3 years ago

edit new information: I have found that an extra field on the card specifically for OME/Online med ed tends to cause the issue. This is a new addition from when i updated the anking deck today but the issue has occurred prior to this. I assume somehow one of the additional fields on the cards are causing the button to disappear. I found that at least for some of the cards if i remove the image/link from the OME field that it solve the issue

fonol commented 3 years ago

Hm, my guess would be some unclosed HTML tag in those specific card's template. If you look at the HTML of one of these cards in the editor, do you notice any missing end tags?

On a sidenote, looking at your screenshot, I should probably restrict the image size for that modal.

Meddymatt commented 3 years ago

to be very honest i have no clue what i would be looking for, i am but a simple medical student with no experience with code at all, i did my best to look through the code and try to find where there might be a missing bracket or </> but did not find any that i can tell. that being said i copied the code for the front and back of the card, as well as the card styling into a word document in case that might help you, and it should be attached. I greatly appreciate the quick response and help with this! this addon has definitely helped a ton with cutting down time finding relevant cards that i need to study anking card code.docx

Gabrusp commented 1 year ago

I had the same issue and found that the tooltip created by the AnkiOCR add-on on the images was the cause. Changing the OCR type from "tooltip" to "new field" was a solution.