Negative lesson count

Noticed this morning that lesson count was off, only showing 1 lesson after adding 3 cards to the deck. Assumed problem was with the cards I’d added. Lesson count dropped to -1 after deleting the two cards I thought were causing the issue. And then went back to 1 after re-adding them.

Deleted a few hibernated cards and lesson count has now dropped to -10! As expected, I’ve only made the problem worse rather than fix it.

Not sure if this is another case of: Negative Lessons and -1 Index on All Cards ?

Sorry for the hassle, any help much appreciated!

1 Like

I’ve reworked the backend with the latest update, which also included the hibernating/filtering and counting system. I’ll go check your account to see what is going on.

Sorry about the inconvenience, I’ll get it fixed asap.

1 Like

@Sparev I’ve tracked down the problem. Apparently you had two progress documents for only one card (not sure how that happened…) and deleting cards was not deleting the reference to hibernated cards, so the count was off.

I’ve fixed both issues for you and deployed a hotfix to prevent this from happening to anyone else. I’ll try to track down where the duplicate progress came from. Could be from a bug that has been fixed already by now though.

Thanks for reporting, glad we catched the bug quickly this way!


So appreciate you getting to that as quick as you did!

This could be a total wild goose chase, but think I had a kanji deck previously that I deleted and remade. Uninspired as I am it may have even had the same name, I can’t quite remember… Some of the cards would of been for the same kanji. Could be part of why there’s two progress documents for one card?

I’m no expert with this stuff in the least so no idea if that’s useful info.

Thanks again!

1 Like

I think those would be unrelated as everything is ID bound. I did investigate further a while ago and saw that it was due to four api calls being done at the exact same moment. So I think something in the frontend is going wrong during lessons.

Thanks for mentioning though!

Please let me know if anything else seems off, it was a very large rework. I’ve tested it quite a lot but as you can see sometimes a bug manages to sneak it’s way through regardless :sweat_smile:

1 Like

Figured it probably wouldn’t be so simple a solution!

As of now it’s all working perfectly as far as I can tell, new cards added with no issue, lesson count is behaving. Will keep an eye out though. :eyes:

Appreciate all your hard work!

1 Like

Think the problem may have reoccured!

Lesson count hasn’t gone negative this time, it’s just displaying zero. But whenever I add new cards, the lesson count doesn’t move from zero unless I add a few cards at once. Then it’ll show some lessons as being available but not all of them. Feels like it’s working through a negative lesson count again, but I don’t really know.

Usual attempts to fix it have been fruitless. Deleting and re-adding the cards, clearing cookies etc etc.

Apologies again for the hassle! :slight_smile:

1 Like

That’s weird. I’ll try to take a look asap! Sorry for the inconvenience :sweat_smile:

No problem at all, thanks for taking a look at it so quick!

Got around the problem somewhat by adding a ‘filler’ card to the lesson pile which has pushed the rest of the cards up out of the negatives so I could just learn them as normal. Only needed to add the one filler card so far. So it’s not like before when the lesson count kept going further into the negatives.

A few days back I had a problem where a particular card was appearing twice in my reviews, so I deleted and added it again which seemed to fix it. Current problem would of occurred after that happened but I don’t know if the two are related.

Thanks again!

1 Like