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

Sets failing to save correctly when creating #72

Closed
ffsb07 opened this issue Nov 24, 2023 · 19 comments
Closed

Sets failing to save correctly when creating #72

ffsb07 opened this issue Nov 24, 2023 · 19 comments
Labels
bug Something isn't working high priority Needs to be addressed urgently

Comments

@ffsb07
Copy link

ffsb07 commented Nov 24, 2023

Progress are not saved even save button was clicked when worked for too long.

Progress saved are deleted if you go back and forth from home to your set

Reloading page will delete all the progress >> it seems like it's having problem fetching data after paged refreshed.

it's having problem saving the data and retrieving data.

@hwgilbert16
Copy link
Owner

Progress are not saved even save button was clicked when worked for too long.

Could you elaborate on this? Are you saying it will not save if the time spent on the creation/editing page is too long?

Progress saved are deleted if you go back and forth from home to your set

Does this occur after clicking create/save?

Reloading page will delete all the progress >> it seems like it's having problem fetching data after paged refreshed.

Are you saying that all progress was lost before clicking create/save? If so, this is expected. Save must be clicked, otherwise the data will not be saved.

@hwgilbert16 hwgilbert16 added the bug Something isn't working label Nov 24, 2023
@hwgilbert16 hwgilbert16 reopened this Nov 24, 2023
@ffsb07
Copy link
Author

ffsb07 commented Nov 25, 2023

The save function is working.
The loading of the page is the issue or the process, IDK what's the technical term.
But after saving the progress and you reload the page, go back and forth pages, suddenly my progress disappear.
What I did, the first time I encounter this when my progress was halved, I quickly edit the SET and half of the progress retains.
second time I experience it, upon refreshing the retain half was gone, the SET contains 0 items. I decided to delete the SET to make a new one.
For quite some time and many attempts, I realize that after you save your progress, the issue came from the page loading.
IDK the term, but it's having hard time to fetch the most recent data. So, after reloading the page, I get 0 progress, after a few seconds and refresh the page or back and forth through the pages or even login log out, the progress back to normal.

Sorry for my English, I think my english is confusing.

@hwgilbert16
Copy link
Owner

Alright - to check, the issue occurs when the page is reloaded too quickly after creating a set, e.g. without giving it a few seconds? This is an issue that has been observed before, but unable to be replicated.

No problem about the English. I've got friends too who are learning.

@ffsb07
Copy link
Author

ffsb07 commented Nov 26, 2023

actually it's like 5 seconds at least? it's really not a real quick.
Even giving it a few more seconds, sometimes it occurs.
I even thought I have problem with my ISP connection. but I don't have problem loading other pages.
I'll try replicating it again today, PST

@hwgilbert16
Copy link
Owner

hwgilbert16 commented Nov 26, 2023

No worries. Let me know whether it is occurring when creating new sets and updating existing ones. i.e. does the issue occur when you update a set that already exists using the save "button," and also when creating new ones using the "create" button?

@ffsb07
Copy link
Author

ffsb07 commented Nov 26, 2023

OKay so I tried again,
The image below is the result of create button.
Gonna start over again

image

@hwgilbert16
Copy link
Owner

How many cards did you have present in the set when you tried creating it, did any of them have pictures or text formatting?

@ffsb07
Copy link
Author

ffsb07 commented Nov 27, 2023

at least 10, just a plain text.

@ffsb07
Copy link
Author

ffsb07 commented Nov 27, 2023

I experience it again.
whenever I create, proceed adding cards, worked for too long without saving by clicking the button create,
The /404 page will show up.

So what I did now was create new set,
Named the set
add term and definition on 1 pre created card
Hit the Create button

error page didn't show this time.
I think, since it has not saved yet, it doesn't have a place to hold temporally the data inputted.

Will you change the creation of set?
like if you create a SET, a pop-up window will be prompted , fill-up the Create SET form, then hit save/create SET.
AFter hitting the button, the SET is saved and created before you can add cards.

@ffsb07
Copy link
Author

ffsb07 commented Nov 27, 2023

Progress saving is a real pain.
specially when you made a lot of formatting.
it's so depressing. hahaha
saving and reloading page really lose all data............
Hope to see new updates very soon

@hwgilbert16
Copy link
Owner

Will definitely be looking into this issue later this week. If you want to try a quick fix, log out and log back in. Expired cookies can sometimes play havoc with authentication when creating sets.

For right now until this issue is fixed, don't add a bunch of cards all at once when creating sets. Add small amounts at a time after initially creating incase the issue occurs.

@ffsb07
Copy link
Author

ffsb07 commented Nov 27, 2023

I already did that.

Definitely, 1 at a time.

@hwgilbert16
Copy link
Owner

I'll take a look into this since this seems to be pretty major.

If you found any patterns of behaviors that may cause the issue, feel free to list them.

@Green-Robot-Dev-Studios

I had written out about 50 cards and then pressed save, and it all disappeared. Likely due to me navigating away before the request was done. Very unfortunate.

@hwgilbert16
Copy link
Owner

hwgilbert16 commented Dec 21, 2023

I had written out about 50 cards and then pressed save, and it all disappeared. Likely due to me navigating away before the request was done. Very unfortunate.

Did you navigate away while the request was still in progress - i.e. it hadn't redirected you to where the new set's page should be? Were you uploading many images while creating the cards?

Been trying to wrestle this issue for weeks.

@hwgilbert16 hwgilbert16 added the high priority Needs to be addressed urgently label Dec 21, 2023
@hwgilbert16 hwgilbert16 changed the title Save function Sets failing to save correctly when creating Dec 21, 2023
@hwgilbert16
Copy link
Owner

@Green-Robot-Dev-Studios @ffsb07

A temporary fix for this issue has been applied in the latest release.

@Green-Robot-Dev-Studios

Thank you very much! This is shaping up to be a great tool! 🚀

@OrkunDzgn
Copy link

@hwgilbert16
I know what the issue is. Even though the "Save" button turns into "Edit" right away, the request continues. If you refresh or leave the page before that request returns 200, then you are technically not saving even though the UI makes you think that it is saved.

A spinner and disabled Save button until the save request returns 200 should solve the issue.

The same issue also happens if you haven't been refreshing the page for some time. In that case, what I do is I open another tab to keep my session refreshed, then click save on the flashcard page with that new session that I got from other page. This failed session operation will also be overlooked if you just look at the UI (save button).

Oh by the way, thank you so much for the tool :)

@hwgilbert16
Copy link
Owner

The same issue also happens if you haven't been refreshing the page for some time. In that case, what I do is I open another tab to keep my session refreshed, then click save on the flashcard page with that new session that I got from other page. This failed session operation will also be overlooked if you just look at the UI (save button).

You're right. The issue was that the logic that refreshes the authentication tokens was being superseded by the individual authentication checks for privileged routes.


@Green-Robot-Dev-Studios @ffsb07 @OrkunDzgn

I pushed a permanent fix for this. If you're using the public version at https://scholarsome.com - the bug is fixed. If you're using a selfhosted local version, then this fix will be in the next update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Needs to be addressed urgently
Projects
Development

No branches or pull requests

4 participants