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

Field loses content after change of URL appendix #164

Open
medienbaecker opened this issue Jan 19, 2023 · 5 comments
Open

Field loses content after change of URL appendix #164

medienbaecker opened this issue Jan 19, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@medienbaecker
Copy link
Contributor

A few months ago I noticed that the markdown field loses its content after you change the URL appendix of the page:

CleanShot_2022-11-29_at_14.16.34.mp4

Now I finally had some time to have a closer look. Here's what I found:

It doesn't happen on slow connections

It doesn't happen when you throttle your connection speed to Fast 3G (1.5 Mb/s) or slower which leads me to the assumption that there's some kind of race happening while the content is transferred from the old page to the new page.

I can solve the issue by removing some code

When I remove the call to setValue() in this file the issue is solved. I do not fully understand what this line does, so I hesitated to create a PR. Nevertheless, I didn't notice any drawbacks after removing the watcher completely.

I was hoping you know what the line does so we can solve the issue. Thank you!

@fabianmichael
Copy link
Owner

@medienbaecker What Kirby-version are you using?

@medienbaecker
Copy link
Contributor Author

I can reproduce it on every Kirby version, also on 3.9.0.

@medienbaecker
Copy link
Contributor Author

@fabianmichael If I interpret your question correctly you could not reproduce it. Could it be related to hard drive speed? I have reproduced it on different servers, both local and remote.

@fabianmichael
Copy link
Owner

@medienbaecker Unfortunately, I did not have a chance of testing this so far but it really sounds like there’s some race condition involved. The issue probably appeared in an earlier version, there’s some leftovers of a skipNextChangeEvent variable, which is currently unsused. Maybe @sylvainjule knows something more about this issue from the time when the initial version of the plugin was developed?

@philipmarnef
Copy link

I'm seeing the same issue on 3.0.0-alpha.2 and Kirby 4.1.1...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants