Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webserver Review Problem: Data salad after displaying the HTML source code #226

Open
jooseef opened this issue Aug 22, 2022 · 3 comments
Open

Comments

@jooseef
Copy link
Contributor

jooseef commented Aug 22, 2022

Hello! o/
I discovered a problem that can be reproduced like this:
Show question from Card A, then show the answer and rate the answer.
Show question from card B. Show the HTML source of question B.
But the HTML source code shows the question of the next card C (should be question B of course).
Now show answer B. The answer is card C's question and card C's answer.
Card B is evaluated and removed from the not-memorized-stack even though the answer was not shown.

https://user-images.githubusercontent.com/108878285/186002311-485bd564-9116-4151-9fa0-44ff9e7a5a9e.mp4
https://drive.google.com/file/d/1QpacIv24UQ0LaQvNtqTfL589SirlFu8a/view?usp=sharing

The reason could be: The web server "thinks" that card B should be evaluated after form = cgi.FieldStorage(fp=environ["wsgi.input"], environ=environ) was called. I have no idea how to quickly fix the problem. Unfortunately I'm not familiar with the code structures of Mnemosyne.

@pbienst
Copy link
Contributor

pbienst commented Aug 22, 2022

Strange.. Is this reproducible? Does it work fine if you do not display the html source?

@jooseef
Copy link
Contributor Author

jooseef commented Aug 22, 2022

Yes I could reproduce it. I created these 3 test-cards as described above. It works fine if I don't display the source, yes.

@pbienst
Copy link
Contributor

pbienst commented Aug 23, 2022

In that case, I suspect that the 'show source' functionality performs some a spurious extra call to the webserver, which messes up its internal logic. Given that average users are unlikely to run into this, I'm not sure we should spend time figuring this one out...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants