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

Unable to complete certain tasks when accessing TemaTres in parallel (e.g. in different browser tabs) #87

Open
a-roussos opened this issue Aug 3, 2023 · 1 comment

Comments

@a-roussos
Copy link
Contributor

Consider the following scenario:

  1. in TemaTres, you start adding a Note for a Term (you're in browser tab 1 at this point)
  2. as you type, at some point you realise you'd like to add a link to another Term inside the note (using the double brackets syntax)
  3. the Term you want to link to does not already exist, so to avoid canceling the form and losing all your work, you open a new browser tab to access the same TemaTres instance
  4. in the new browser tab you click on 'Add Term', type a name for your new Term and hit the 'Submit' button -- All good! 👌 the new Term is saved without any problems
  5. you switch back to tab 1, complete the linking process and hit the 'Submit' button -- Not good! 💥 you're redirected to the first page of your TemaTres instance, and the new Definition Note you wanted to add is never saved!

I think the following code might be related to this behaviour:

function HTMLformEditTerms($taskterm, $ARRAYtermino = "0")
{
//SEND_KEY to prevent duplicated
session_start();
$_SESSION['SEND_KEY']=md5(uniqid(rand(), true));

//SEND_KEY to prevent duplicated
session_start();
$_SESSION['SEND_KEY']=md5(uniqid(rand(), true));

However, I'm unsure about what is meant by "to prevent duplicated".
I perused the Open Issues list and found #53, but I think perhaps it's unrelated to what we observed?
@tematres, can you help us out? Thank you! 😄

@tematres
Copy link
Owner

Hi @a-roussos , we use this way to prevent resend data when user reload. This "KEY" create a time interval to send the data. May be we can explore another way to prevent reload the page and resend the data :/ .... any idea?

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