[No Longer Working] WaniKani Lesson User Synonyms

Not sure if this script is still being maintained (doesn’t look like it but o well, I don’t know where else to post it), but since two days or so, the synonyms that I’ve added during lessons somehow disappear again?

For instance I learn the word 保護する, then I add my synonym to it right then and there.
When I’m being asked about the items I’ve just learned the synonym is still there. But as soon as it shows up in my review queue the synonym is no longer there and I have to add it a second time…?

I’ve just had the same problem. Seems like this might not be being maintained anymore, which is a shame cause it’s super useful.

By the way, has anyone ever discovered any reason this is not a part of the regular experience? Especially given the pointlessly frustrating way you’re forced to add synonyms during reviews.

No clue, it could be so you’re not cheating and actually learn/write out the meaning they give you before you can continue?
Which would make sense but still, I like to add synonyms beforehand because words from my native language are usually easier to remember. :confused:

Adding your native language synonyms is totally legitimate, I think. As is adding English synonyms since there are a lot of items where WK’s lack of synonyms is frankly ridiculous.

Personally, I add the romaji for items I already know well or which don’t need an English translation. Eg. お疲れ様、玄関 etc

2 Likes

For the last two or three weeks the script has not been working anymore. I can still enter synonyms during lessons but once I get out of lessons after the quiz, they are gone.
Is anyone here having the same problem?

Just noticed today people have been posting about this…
Did some testing and yes it seems broken.
Some of the server-side behavior it relied on is now gone.

Trying to set notes or synonyms on still locked items now gives a 404-error.
So WK is rejecting them.

Unlocked but still unlearned items seem possible to set…
The server takes both notes and synonyms with no error.
But upon lesson completion, the synonyms seem to be erased.
I am able to read-back synonyms on unlearned items using the API-V2, so they are being saved by the server…

The script could perhaps be changed to submit synonyms to the server after lesson completion, rather than immediately after entering them.

I agree the functionality this script provided should be a stock feature…
I can’t really see why we shouldn’t be able to add notes and synonyms for any item unlearned or even still locked.

Ran across this thread:

@viet
Previously it was possible to submit synonyms for unlearned items during lessons and have them retained after lesson completion.
It now appears that such synonyms are being erased upon lesson completion.
Is there any possibility of restoring the previous behavior?

Reading the API-V2 ‘study_materials’ data for an item immediately before lesson completion it shows the added synonyms.
Reading again just after lesson completion shows they are all gone.

3 Likes

Normally we do not make accommodations who make creative use of internal endpoints or work around our code. It is exposed for our use only. We can’t stop people from poking around, but it is to be used at your own risk.

Having said that, it is weird the synonyms are being wiped out after lesson completion since this is going against what we expect to happen (basically it should not happen). I don’t know how the userscript works, nor will I spend the time debugging something we didn’t write up. But the fact the synonyms are supposably being wiped at lesson completion when we believe it shouldn’t we will look into. Going to try and replicate the issue on our end and go from there.

During your tests did you add notes?

EDIT: We found the issue. Hotfixing it now.

1 Like

Yes. Both meaning and reading notes seemed to always be preserved.

Thank you.

Update will be live in three minutes.

Thanks for bringing this to our attention.

3 Likes

Just tested this out on a new bunch of lessons and…it worked fine!

Thanks a lot @viet . I understand it’s not your problem whatsoever if there’s an issue with userscripts so it’s really nice of you to help out on this one. Cheers!

I’m out of lessons right now but I will test once I have new unlocked items.

Thanks a lot, Kobayashi (for looking into it) and Viet (for fixing it).
This is the only user script I rely on but it’s incredibly useful.

I’ve used it in today’s lessons as well and it seems to be working all right again! Thank you so much for fixing it! :heart:

Now Working:
User Synonyms entered during lessons are now retained.
Also those entered on item pages for unlocked items (those with pending lessons).

Other Bug Fixed:
The script was not loading right on item pages in chrome for me.
Posted an updated version that fixes only this.

Still Broken:
User Synonyms and Notes on still locked items.
If you use the item page to try to add notes to a locked item you will get the red error “Error Adding Note. Retry?”.
If you use the item page to try to add synonyms to a locked item nothing seems to happen when you hit the “ADD” button.
(Strangely there are exceptions to this… Sometimes it works. But mostly it doesn’t.)

Thanks for your hard work :slight_smile: Please update if things change.

It’s working! Once again, thank you.

@kobayashi Does this script do anything with notes during lessons? I’ve had a few notes not save in the last few days and I wanted to check before reporting it to WaniKani.

Yes, it does interact with notes on the lesson page.
Mostly to extend the jStorage TTL (auto deletion time) of the locally saved copy of the note.
The default is delete after 2-hours.
Which makes sense if you assume users will only enter a note shortly before completing the lesson.

I don’t believe this script should interfere with note submission to the WK server.
But it does interact with notes somewhat, so perhaps it would be best to attempt bug replication without this script.

Not quite clear on what exactly your issue is.
Do you mean the lesson page does not actually accept the note? Like saving does nothing or gives an error?
Or do you mean it accepts the note normally and then WK ‘forgets’ about it after lesson completion?

I have disabled the script (as of yesterday) and I’ll let you know if this issue occurs with the script off.

Visually the note appears to save. However, when I go to do the lesson quiz and I check the notes, some of the notes disappeared. I always readded my missing notes during the quiz, so I don’t actually know if they would have shown up after the lesson was completed.

I think I have replicated the behavior you describe with the script enabled.

Enter meaning and reading notes for all five lesson items.
Start quiz.
Before successfully answering all parts of an item, meaning and reading notes show up fine.
After successfully answering all parts of an item, meaning and reading notes are both gone.

Checking the item pages after lesson quiz completion, meaning and reading notes are retained.
They are only missing on the quiz page.

With the script disabled the above test always shows all meaning and reading notes.

This is a logic bug in the script regarding cleanup of jStorage keys upon lesson completion.
Not sure if I ever noticed this behavior before, but the script has probably always done this.
Need to look into it a bit more, but probably fixable.

1 Like