-
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
Weird behavior trying to save a WordPress embed as reusable block #9938
Comments
Seems to be specific to WordPress embeds. Twitter worked ok. There are also some yucky rendering issues with reusable embed blocks. Time to dive into the implementation..! |
This is a deeper issue with WordPress embeds, how we detect them and make sure the correct embed block is used, and how the JavaScript that does the embedding gets loaded. It's... not straightforward. I am drinking lots of coffee, put it that way 🤣 |
Some progress, some... not progress. I have a fix for the WordPress embed block - that's good! The reusable blocks are only meants for static content - that's not so good! Because it means that when a reusable block is used in a post, the content doesn't get any further processing. So the URL you embed doesn't get processed, and the content doesn't embed, it just shows the URL on the page. I'll continute investigating to see if there's anything we can do to fix this, but at this point having read the code, it seems that reusable blocks are for static content only. I'll update here once I know more. |
...and 2 minutes after I posted that, I think I found a fix :) |
Noting this was also reported by another tester at https://make.wordpress.org/test/2018/09/14/call-for-testing-gutenberg-3-9-pre-release/#comment-1075 |
@designsimply thanks! The PR that fixes this has a conflict, I'll fix that first thing tomorrow and request a core review :) |
PR conflict is resolved. @bph the fix is up for review by the core team now, so hoping this should be fixed very soon :) |
Describe the bug
I added a WordPress embed block to my post. It worked. Then I used "add as reusable block", it bypassed the save screen and added it as an "untitled" to the list. Then I tried to add it to a post. The "An error happened screen" appeared. (nice!!)
And I was able to "copy the error" see below.
NOTE: The error message indicates 3.9 RC, I tested it in 3.8 as well, with the same outcome.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Video
http://recordit.co/cHJ3ygmpqZ
Desktop (please complete the following information):
Error Message
TypeError: this.props.onReplace is not a function
at r.value (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/build/block-library/index.js?ver=1537102276:12:86194)
at new r (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/build/block-library/index.js?ver=1537102276:12:84960)
at yh (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:97:111)
at lg (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:120:88)
at mg (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:120:386)
at gc (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:127:202)
at vb (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:126:230)
at ub (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:126:65)
at ug (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:136:380)
at ue (http://rctesting.local/wp-content/plugins/gutenberg-3.9-RC/vendor/react-dom.min.82e21c65.js:25:80)
The text was updated successfully, but these errors were encountered: