4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Busy 2.5.1 Bug: Edit post button doesn't show the post data in the editor initially

Project Information

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;
        })
...

GitHub Account

https://github.com/jrawsthorne

14 upvotes 1 downvotes $6.31

Replies (2)

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: