distantnative / retour-for-kirby

Kirby CMS plugin to manage redirects and track 404s right from the Panel
https://distantnative.com/retour-for-kirby/
MIT License
135 stars 15 forks source link

Click in window deletes all available redirects #221

Closed chrfickinger closed 3 years ago

chrfickinger commented 3 years ago

Describe the bug

After editing an redirect entry in drawer, the file redirects.yml with a couple of entries was cleared completely and looked like this:

routes: [ ]
schema: 3.0.0

This behavior has already occurred twice the last days. Once after clicking on the check icon in the title bar of the drawer and once when clicking outside the drawer (which also closes the window). After restoring the redirects.yml via git all the hits were also back. So it obviously only affects the redirects and not the logs.

Steps to reproduce

not reproducible

Specifications

chrfickinger commented 3 years ago

Additional info to reproduce:

It seems it is a caching problem in Chrome 88 on Windows 10. For some reasons chrome doesn't always seem to succeed in loading the existing entries and an empty table is displayed. If afterwards a new entry is added or clicked outside the drawer, the existing redirects are overwritten with the empty content. I hope this helps a little bit to debug the behavoir.

chrfickinger commented 3 years ago

Obviously it's not just chrome. I just had the same behavior under Firefox 85 on Macos 10.14.6

distantnative commented 3 years ago

FYI I'm currently working on a more stable solution for updating the redirect routes data.

distantnative commented 3 years ago

I think this should be solved with the upcoming release.

chrfickinger commented 3 years ago

Thank you for letting me know!

distantnative commented 3 years ago

I'll release a version with that fix later today.

distantnative commented 3 years ago

chrfickinger commented 3 years ago

Bug is not yet fixed. It happened again. Let me know if I can share anything to reproduce the behavior.

distantnative commented 3 years ago

:(

Any errors in the console?

chrfickinger commented 3 years ago

Actually I don't get the point when it happes. I didn't work on the redirects for a while and when I came back to the panel the file was empty again.

distantnative commented 3 years ago

Bundling errors under this issue: https://github.com/distantnative/retour-for-kirby/issues/229