tematres / TemaTres-Vocabulary-Server

Web application for management formal representations of knowledge, like controlled vocabularies, taxonomies, thesauri and glossaries
https://vocabularyserver.com
124 stars 53 forks source link

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

Open a-roussos opened 1 year ago

a-roussos commented 1 year ago

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:

https://github.com/tematres/TemaTres-Vocabulary-Server/blob/ecea5ff9bb4c654f6a6e2cd5b71accde867fb1ca/common/include/fun.html_forms.php#L264-L268

https://github.com/tematres/TemaTres-Vocabulary-Server/blob/ecea5ff9bb4c654f6a6e2cd5b71accde867fb1ca/common/include/inc.abmNota.php#L13-L15

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 commented 1 year ago

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?