-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Wrong export/import of Gutenberg post_content #10684
Comments
This is not solved in 4.0 RC-1: I still have these two problems:
|
Are the steps to reproduce and code snippet at #9423 (comment) still relevant for testing for this case? I see that it was recommended in that discussion to use the forums or Slack for detailed technical questions and I also see you had further questions there about trying to double check whether it's really a bug or not. |
This is already solved for me: #9423 (I updated my above comment before you replied which says that this is no longer the case in Gutenberg 4.0 but it is the case in 3.9. I updated to 4.0 after I wrote this ticket and then I made a correction). So this is the only problem that remains:
Solution: When I manually update |
I suggest creating a Trac ticket as it seems that the error is in the php functions used here. |
Exporting Gutenberg content via
get_posts
and then importing viawp_insert_post
doesn't work. I also dojson_encode
andjson_decode
.The problem is that
--
is converted to\\u002d\\u002d
."post_content": "<!-- wp:slug\/some-block {\"someAttributeOfThisBlock\":\"someValue\"} \/-->\n\n<!-- wp:slug\/some-other-block {\"someProp\":1234,\"someOtherProp\":\"xyz\",\"className\":\"x-y-z-a-b\\u002d\\u002dc\"} \/-->",
The text was updated successfully, but these errors were encountered: