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

Store and update post status in dt object. #1114

Merged
merged 5 commits into from
Jul 16, 2023

Conversation

peterwilsoncc
Copy link
Collaborator

@peterwilsoncc peterwilsoncc commented Jul 14, 2023

Description of the Change

Fixes a bug introduced during the 2.0.0 release cycle in which unchecking the send as draft checkbox would cause an error for posts that had changed status while the editor was open.

Fixes #141
Follow up to #1022

Note

The custom Cypress distributorPushPost command automatically reloads to page before attempting to distribute (this allows us to distribute a post ID from anywhere). I tried to use cy.url() to only refresh pages when needed but without success.

Any assistance here would be most helpful.

How to test the Change

  1. Create and publish a new post
  2. The Distributor menu will appear
  3. Hover over the menu, select a destination to push to
  4. Uncheck the "Send as draft" checkbox
  5. Click "Distribute"

On this branch the post should successfully distribute. On develop the post will:

  • show an error for external connections
  • apparently succeed for network connections but if you visit the site's admin the post will not appear.

Changelog Entry

Just add this PR to the existing entry Toggles the Distributor admin bar element in Gutenberg based on the post status

Credits

Props @peterwilsoncc

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@peterwilsoncc peterwilsoncc marked this pull request as ready for review July 14, 2023 01:15
@peterwilsoncc peterwilsoncc requested a review from a team as a code owner July 14, 2023 01:15
@peterwilsoncc peterwilsoncc requested review from ravinderk and ggutenberg and removed request for a team July 14, 2023 01:15
@peterwilsoncc peterwilsoncc self-assigned this Jul 14, 2023
@peterwilsoncc peterwilsoncc added this to the 2.0.0 milestone Jul 14, 2023
@peterwilsoncc peterwilsoncc merged commit 3eac2c8 into develop Jul 16, 2023
@peterwilsoncc peterwilsoncc deleted the fix/141-post-status-follow-up branch July 16, 2023 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gutenberg: Extra Refresh to Push Content In Gutenberg
3 participants