Describe the bug
After renaming a page title in the Panel, a situation can occur where saving other content changes reverts the title to the original value. This is much easier to reproduce if you can move "faster" than the server can; you can simulate this by artificially slowing down calls.
Happens on Safari and Chrome.
To Reproduce
Steps to reproduce the behavior:
Prepare StarterKit to artificially be slow (described at the bottom)
Open a Note in the Panel, such as http://localhost:8000/panel/pages/notes+across-the-ocean
Rename the page in the Panel
Modify the Text content in the Panel and Save
Everything should still be in sync with the Panel and the content file.
Rename the page in the Panel
While that is saving, click to dismiss the Rename panel.
Change the Text content in the Panel and Save. This must be done quickly after dismissing the Rename panel.
Steps 3 and 4 appear to be essential in causing this error to occur. I cannot reproduce without doing those first.
Expected behavior
The Panel and Content File should be in sync. In the video above, the previous title of "Across the ocean 2" is in the Content File, but "Across the ocean 25" is displayed. If you refreshed the page, it would show the "2" variant.
Screenshots
Kirby Version3.1.3
Desktop (please complete the following information):
OS: macOS 10.14.4 (18E226)
Safari 12.1 (14607.1.40.1.4)
Chrome 74.0.3729.108
To simulate slowdown:
Create a file at site/models/note.php with the following:
<?php
class NotePage extends Page
{
public function slowTags()
{
sleep(2);
return [];
}
}
2. Modify the Blueprint file at `site/blueprints/pages/note.yml` and replace:
```yaml
tags: true
Describe the bug After renaming a page title in the Panel, a situation can occur where saving other content changes reverts the title to the original value. This is much easier to reproduce if you can move "faster" than the server can; you can simulate this by artificially slowing down calls.
Happens on Safari and Chrome.
To Reproduce Steps to reproduce the behavior:
http://localhost:8000/panel/pages/notes+across-the-ocean
Steps 3 and 4 appear to be essential in causing this error to occur. I cannot reproduce without doing those first.
Here's a video of the steps above (starting at step 2): Screen Recording 2019-04-29 at 1.10.40 PM 3.mov.zip
Expected behavior The Panel and Content File should be in sync. In the video above, the previous title of "Across the ocean 2" is in the Content File, but "Across the ocean 25" is displayed. If you refreshed the page, it would show the "2" variant.
Screenshots
Kirby Version
3.1.3
Desktop (please complete the following information):
To simulate slowdown:
site/models/note.php
with the following:class NotePage extends Page { public function slowTags() { sleep(2); return []; } }
with: