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

all content arriving as single classic block, can't publish #516

Closed
jshwlkr opened this issue Feb 6, 2020 · 5 comments · Fixed by #534
Closed

all content arriving as single classic block, can't publish #516

jshwlkr opened this issue Feb 6, 2020 · 5 comments · Fixed by #534
Assignees
Labels
needs:feedback This requires reporter feedback to better understand the request. type:bug Something isn't working.
Milestone

Comments

@jshwlkr
Copy link

jshwlkr commented Feb 6, 2020

Describe the bug
Running three WP 5.3.2 sites (not multisite) locally via VVV, distributing content via pull seems to lump all content into a single classic editor block. The post is then unable to be published. If I edit the original post the content is added to the classic editor block in the distributed post.

Expected behavior
Blocks would remain intact in the distributed content and it would be publishable directly.

Environment information

  • Device: MacBook Pro
  • OS: MacOS 10.13.6
  • Browser and version: Chrome 79.0.3945.130
  • Distributor version: 1.5.0
  • Theme and version: Twenty Twenty 1.1
  • Other installed plugin(s) and version(s):
    Query Monitor 3.5.2
    Application Passwords 0.1.1
@jshwlkr jshwlkr added the type:bug Something isn't working. label Feb 6, 2020
@jeffpaul
Copy link
Member

@jshwlkr can you confirm whether Gutenberg is active on the site the content is being pulled from and if so whether that version matches the version on the site pulling content?

@jeffpaul jeffpaul added the needs:feedback This requires reporter feedback to better understand the request. label Feb 11, 2020
@dkotter
Copy link
Collaborator

dkotter commented Feb 14, 2020

This might also be related to #512, which there's an open PR for that we will merge in for a 2.0.0 release.

@jeffpaul
Copy link
Member

@jshwlkr are you able to test the develop version of Distributor as we've merged in a potential fix for this issue and would love your help testing to confirm things now work as expected?

@jshwlkr
Copy link
Author

jshwlkr commented Feb 27, 2020

I can confirm the same version of Gutenberg is active on both sites. I've tried using develop, it is still not working as expected. (I don't know if it's pertinent, but I'm on PHP 7.3.15.)

@dinhtungdu
Copy link
Contributor

I want to clarify this a little bit. The issue only happens with pulled posts of external connections.

Look at the code below, we use \Distributor\Utils\is_using_gutenberg( new \WP_Post( $obj ) ), this check is always false because we haven't add post content yet.

// Use raw content if both remote and local are using Gutenberg.
$obj->post_content = \Distributor\Utils\is_using_gutenberg( new \WP_Post( $obj ) ) && isset( $post['is_using_gutenberg'] ) ?
$post['content']['raw'] :
Utils\get_processed_content( $post['content']['raw'] );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:feedback This requires reporter feedback to better understand the request. type:bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants