oppia icon indicating copy to clipboard operation
oppia copied to clipboard

Invalid translation counts in the ExplorationOpportunityModel

Open chris7716 opened this issue 10 months ago • 5 comments

Steps to reproduce

  1. Steps to reproduce(in dev server)
  2. Submit translations for all cards of “Finding the value of a number” lesson
  3. Accept all translation suggestions for that lesson
  4. Change the second card of the lesson. Change the interaction to multiple choice and add three choices.
  5. Add one correct interaction
  6. Add two hints
  7. Publish the lesson
  8. Translate all the available cards for the lesson “Finding the value of a number” except one hint.
  9. Accept all the submitted cards
  10. Now go back to the lesson and revert the version back to the 2nd version of the lesson.
  11. Now go back to the CD “Translate Text” tab.
  12. You will see all the cards of the lesson again to translate.
  13. Add translations to them
  14. Now try to accept those translations
  15. You will get the error for invalid translations count.

This might be happening since we do not create new version of EntityTranslationModel when we reverting an exploration.

This needs to be fixed because, if not, translators will occasionally run into this error and it will block all translation progress

316251586-a2714468-c66b-4849-b7e8-2127bfbcf669

Related: https://github.com/oppia/oppia/issues/20033

chris7716 avatar Apr 25 '24 14:04 chris7716

Hello @chris7716, is this reproducible in local serve.

masterboy376 avatar Apr 30 '24 13:04 masterboy376

Hello @chris7716 , successfully reproduced on the local machine. I also found out that the modal to mark translation as stale was only popping up when we were updating an existing content with previous translation and not when we delete any existing content. Screenshot (156) Screenshot (157) Screenshot (155) Also, is it the same issue for which you were writing a regeneration job.

masterboy376 avatar May 08 '24 15:05 masterboy376

Here's my analysis of this issue for future reference: https://gist.github.com/U8NWXD/628433fd22d5def7fe07f61e31c25169

U8NWXD avatar Jun 18 '24 16:06 U8NWXD

@masterboy376 Could you create a debugging doc for this issue and fill it with everything you investigated/attempted so far? This will help the CD team leads be better informed on your progress for this issue, and it will allow others in the team to make suggestions and pose questions to help you when you get stuck.

To create the debugging doc, follow the instructions at https://github.com/oppia/oppia/wiki/Debugging-Docs

StephenYu2018 avatar Jun 28 '24 12:06 StephenYu2018

Actually, forget my last comment. I didn't see the PR on the issue thread by mistake.

StephenYu2018 avatar Jun 28 '24 13:06 StephenYu2018

Fixed by #20320

StephenYu2018 avatar Aug 13 '24 16:08 StephenYu2018