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

Writer field overwritten with cached values from nested children #6506

Open
FynnZW opened this issue Jun 25, 2024 · 1 comment
Open

Writer field overwritten with cached values from nested children #6506

FynnZW opened this issue Jun 25, 2024 · 1 comment
Labels
type: bug 🐛 Is a bug; fixes a bug

Comments

@FynnZW
Copy link

FynnZW commented Jun 25, 2024

Description

When I edit a writer field in a nested child page and go back to the parent, the writer field is overwritten with the value from the child page (see attached video).

I suspect a vue caching issue?
Interestingly, it seems to only happen when I save with keyboard shortcut (cmd + s).

Screenshots

342820794-58e3eee9-758b-4a2f-83f6-d587f0787b8f.mp4

To reproduce

  1. Create a new kirby installation
  2. Create parent page with writer field named text
  3. Create child page with writer field named text
  4. Edit the child page's writer field, save with CMD + S, return to parent
  5. See parent content was overwritten

Your setup

Kirby Version
4.3.0 (also tested with 4.2.0 and 4.1.0.)
Tested with a fresh kirby plainkit and no plugins.

Your system (please complete the following information)

  • OS: macOS 14.5
  • Browser: Chrome Version 126
  • local server: Laravel Valet 4.7.1 (4.6.1 also tested)
@distantnative
Copy link
Member

distantnative commented Jul 21, 2024

I can reproduce the bug as described.

What I have tracked so far:
After navigation to the parent page, FieldsSection.vue::onInput sends another update to the content Vuex store with the value from the child page's field.

Maybe this is triggered by a blur event in the input and as race condition arrives later to FieldSection than the navigation which already concluded.

Definitely a hard one: whether race condition or reactivity problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants