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

[Factsheets] Bug when editing a framework factsheet #697

Closed
jh-RLI opened this issue Dec 8, 2020 · 5 comments · Fixed by #1404
Closed

[Factsheets] Bug when editing a framework factsheet #697

jh-RLI opened this issue Dec 8, 2020 · 5 comments · Fixed by #1404

Comments

@jh-RLI
Copy link
Contributor

jh-RLI commented Dec 8, 2020

What is the Issue about?

A user edits a framework factsheet and unchecks a checkbox, for example. Then the input is confirmed with "submit all". Up to this point everything runs as expected. If now the same framework factsheet is edited again because another value is to be changed, then a cached page is provided by the browser. The problem is, that the values of the state before the first editing are displayed. If you empty your browser cache and reload the page the updated values are displayed.

Solution:

  • Quick fix: use Strg+F5 to reload the page.
  • Long term fix: Caching should be disabled for the factsheets pages.
@Ludee
Copy link
Member

Ludee commented Jan 7, 2021

The same is observed on the model and scenario factsheet.
While this is a minor bug it has a huge impact on the usability.

Is the proposed solution to disable caching a valid solution?
How can this be implemented in Django?

@jh-RLI jh-RLI added the devmeeting discuss in next oep dev meeting label Jun 10, 2021
@jh-RLI
Copy link
Contributor Author

jh-RLI commented Jul 5, 2021

@johannwagner can you advise on the best way to tackle the issue? Is my suggested solution for such problems (disable cacheing) applicable? Or do you see another reason for the problem. If you don't know how something like this happens either, I'll do some research.

@maurerle
Copy link

This is a quite annoying bug - as showing an outdated view gives the user the impression that the update did not work.
F5 works good, but is a quite technical workaround.

One can tell the browser that a document should be updated, by serving a different ETag of the file:
https://docs.djangoproject.com/en/4.2/topics/conditional-view-processing/#the-condition-decorator

Maybe this helpes to reduce the caching issues?

@jh-RLI
Copy link
Contributor Author

jh-RLI commented Oct 16, 2023

Thanks for this tip did not know about the ETag. I will try it out and implement, as long as not too many follow-up problems occur :)

@jh-RLI jh-RLI assigned jh-RLI and Darynarli and unassigned johannwagner and adelmemariani Oct 16, 2023
jh-RLI added a commit that referenced this issue Oct 16, 2023
…w to prevent #697

requires TOEP test to validate resolved bug
jh-RLI added a commit that referenced this issue Oct 16, 2023
@jh-RLI
Copy link
Contributor Author

jh-RLI commented Oct 16, 2023

Well i decided to use the never_cache decorator as it seems to be more predictable. We will install the fix on our test-oep instance soon and check if it solves the issue.

@jh-RLI jh-RLI closed this as completed Nov 14, 2023
SzenarienDB automation moved this from In progress to Done Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug devmeeting discuss in next oep dev meeting Factsheets help wanted
7 participants