globalbibletools / gbt

https://interlinear.globalbibletools.com
15 stars 2 forks source link

Bug: notes display not updated #396

Closed tycebrown closed 6 months ago

tycebrown commented 6 months ago

Describe the bug Modifications to the contents of a word's notes are not displayed. The "Updated At ..." message does not appear/is not updated. It may be that the database is not updated/queried from correctly. Or, it could just be a frontend problem

To Reproduce Steps to reproduce the behavior (from Addison's comment in PR #394):

  1. Click on a gloss input
  2. Go to the notes tab
  3. Enter a footnote
  4. Click outside the footnote input
    • For some reason the "updated at" text doesn't show up
  5. Click on a different gloss
  6. Click on the original gloss
  7. The footnote is gone

Expected behavior The note's content should be updated and displayed to the user. Tenative: It appears, at the current moment, that the database does update, but the network request responds with the old content but the query used to fetch the notes does not work properly.

Screenshots

Environment (please complete the following information):

tycebrown commented 6 months ago

Alright, I think I've found part of the issue. The notes query is returning multiple entries with the same wordId but different translatorNoteContent and footnoteContent.

tycebrown commented 6 months ago

@arrocke Would that be because the query LEFT JOINs the PhraseWords, which are/can be connected to multiple Words?

arrocke commented 6 months ago

I doubt that's the problem because our api calls prevent that scenario. From what I can see the query that executes immediately after the update, the timestamp is still 0. I'm not seeing the footnote disappear.

arrocke commented 6 months ago

Found it! The notes query is swapping the footnote and translator note timestamps