Plugin: Fix saving new posts by making the post type mandatory#1395
Merged
youknowriad merged 2 commits intomasterfrom Jun 23, 2017
Merged
Plugin: Fix saving new posts by making the post type mandatory#1395youknowriad merged 2 commits intomasterfrom
youknowriad merged 2 commits intomasterfrom
Conversation
Contributor
|
Fast work! Nice work! Fixes it for me! Can't comment on the code, but 👍 from me. |
nylen
reviewed
Jun 23, 2017
| wp_add_inline_script( | ||
| 'wp-editor', | ||
| 'window._wpGutenbergPost = ' . wp_json_encode( $empty_post ) . ';' | ||
| ); |
Member
There was a problem hiding this comment.
Error handling is still TODO here. Let's not remove that comment yet. Edit: Done in db4d9a1
nylen
approved these changes
Jun 23, 2017
Member
nylen
left a comment
There was a problem hiding this comment.
Code seems fine to me, though we need integration tests to prevent issues like this in the future.
Member
|
Agreed we cannot be regressing like this at this stage. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1276 introduced a regression where saving new posts was broken because it assumes the post type is always present in the store.
I'm fixing this by making the
postparam tocreateEditorInstancemandatory with a post type.