Busy 2.5.1 Bug: Edit post button doesn't show the post data in the editor initially
Project Information
- Repository: https://github.com/busyorg/busy
- Project Name: Busy
- GitHub Issue: https://github.com/busyorg/busy/issues/2057
Expected behavior
When you click the edit post button the title, body, tags etc... should show in the editor without needing to reload the page.
Actual behavior
The editor is blank until you refresh the page or go to another draft and back again.
How to reproduce
- Visit https://staging.busy.org
- Go to edit a post you have made
- You are taken to the editor page but the title, body, tags etc... are blank.
Recording Of The Bug
Possible solution
Introduced in #2054
This redirects to the editor before the user's metadata has been updated with the new draft
if (redirect) dispatch(push(`/editor?draft=${post.id}`));
The solution would be to redirect once the promise has been fulfilled
promise: addDraftMetadata(post).then(postMetadata => {
if (redirect) dispatch(push(`/editor?draft=${post.id}`));
return postMetadata;
})
...
Hi @jrawsthorne, thanks for the contribution.
I see the PO already fixed it in this commit. Good job pointing the cause and proposing a fix.
My feedback:
The submission title follows the Utopian convention except for the addition of "bug" to the app name in the title. Its kind of reduntant cause we already know this to be a bug post.
The steps to reproduce, the expected and actual behavior provided clear information. Easy to read through :).
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Hey @jrawsthorne
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!