arbyste / jp-mining-note

Temporary bugfix fork for JPMN
MIT License
45 stars 2 forks source link

Notes back side shows error #18

Closed ganqqwerty closed 6 months ago

ganqqwerty commented 7 months ago

Describe the bug On the back side of the note I see the following error every time:

Error: Unexpected flattened.childNode: [object HTMLSpanElement]
    at Fe.getMoraeOfAJTWord (_jpmn_main_back.js:1:53134)
    at We.getPosDataList (_jpmn_main_back.js:1:47854)
    at We.parse (_jpmn_main_back.js:1:48148)
    at Fe.addPosition (_jpmn_main_back.js:1:56057)
    at Fe.main (_jpmn_main_back.js:1:56463)
    at Fe.run (_jpmn_main_back.js:1:27098)
    at _jpmn_main_back.js:1:115704
    at _jpmn_main_back.js:1:116080
    at _jpmn_main_back.js:1:116097
    at http://127.0.0.1:63861/_anki/js/reviewer.js:441:20738
(sm:parseAJTWordPitch) Error in generatePitchHTML, using raw AJTWordPitch instead

CleanShot 2024-03-09 at 11 27 23@2x

To Reproduce didn't do anything special, just rep the card and see its backside

Expected behavior A clear and concise description of what you expected to happen.

Example Cards(s) https://drive.google.com/file/d/1VHpIEIzoxbfb58rWjF8qQ1aGBFXo6HQV/view?usp=sharing

Screenshots

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

ganqqwerty commented 7 months ago

I used arbyste's versions of plugins

arbyste commented 7 months ago

The AJTWordPitch field of that card is formatted incorrectly. If you're using the most recent version of my fork of the AJT Japanese add on, then that shouldn't happen on new cards (https://ankiweb.net/shared/info/200813220).

Since you said you're using my versions of the add-ons, I'm guessing that's an old card that was generated with different AJT settings? If that's the case, you'll need to regenerate the AJTWordPitch field for all those cards. Instructions on how to do this are here: https://arbyste.github.io/jp-mining-note-prerelease/setupchanges/#v0-12-0-0-prerelease-13-ajt-regen

arbyste commented 6 months ago

I'm assuming this fixed your problem, and am closing this issue. If you're still having this problem, let me know and I'll reopen it.