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

'Freeform' block is not supported error appears in between a custom post type's template blocks #52811

Closed
skorasaurus opened this issue Jul 20, 2023 · 6 comments
Assignees
Labels
[Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation [Type] Regression Related to a regression in the latest release

Comments

@skorasaurus
Copy link
Member

skorasaurus commented Jul 20, 2023

Description

After the introduction of #52325,

I'm running into a unique case specifically: when editing already published custom posts whose content is inserted through the register_post_type($template), A block warning appears in the editor stating 'Your site doesn’t include support for the "core/freeform" block. You can leave this block intact or remove it entirely.'

As far as I know, the block content I have inserted into the custom post type is valid and does not contain a classic block.

Notably, I am unable to reproduce this in Gutenberg 16.2.1;

Step-by-step reproduction instructions

  1. Install Gutenberg nightly from or update your current branch to trunk (and build)
    2a. Go to Experiments http://yoursite.test/wp-admin/admin.php?page=gutenberg-experiments.
    2b. Enable the "Disable TinyMCE and Classic block" experiment and click "Save Changes".
  2. Install and activate the test case plugin - (https://gitlab.com/cpl/test-case-52811)
  3. create new 'agenda' (the new custom post type);
  4. publish the post
  5. refresh the editor in your browser

Screenshots, screen recording, code snippet

2023-07-20-gutenberg.mp4

Environment info

WP 6.2; Gutenberg built from trunk 2023-07-18 or newer. Have been able to reproduce with and without classic editor plugin installed.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

yes (except the test case plugin)

@skorasaurus skorasaurus added [Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation [Type] Regression Related to a regression in the latest release labels Jul 20, 2023
@skorasaurus skorasaurus changed the title 'Freeform' block is not supported error in between parts of 'Freeform' block is not supported error appears in between a custom post type's template blocks Jul 20, 2023
@Mamaduka
Copy link
Member

Cc @tyxla

@tyxla
Copy link
Member

tyxla commented Jul 24, 2023

Thank you @Mamaduka for the ping and @skorasaurus for the thorough report!

I'll work on a fix this week.

@tyxla
Copy link
Member

tyxla commented Jul 25, 2023

Alright, I've got a few related and direct fixes of this one - could use some 👀 if you folks have a chance:

Let me know what you think!

@tyxla
Copy link
Member

tyxla commented Jul 26, 2023

@skorasaurus now that we merged #52935 and #52936, would you mind giving this a try with the latest trunk?

We still have #52938 open, but that resolves a different scenario, so you should be good when testing with the above steps. Actually, this landed as well already.

Let me know how it goes, thanks 🙌

@skorasaurus
Copy link
Member Author

Thank you again for your work @tyxla and @Mamaduka (and anyone who reviewed the PRs).

Using the latest trunk, I am unable to reproduce the issue described earlier. I tested using my reduced test-case plugin and in another plugin that I maintain that has more complex blocks in the custom post template.

I edited and updated some other classic blocks on other pages on my site(s), and they worked as expected as well.

@tyxla
Copy link
Member

tyxla commented Jul 27, 2023

Good to hear! 🎉

Thanks for confirming @skorasaurus and once more, thank you for testing the TinyMCE deprecation experiment 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Validation/Deprecation Handling block validation to determine accuracy and deprecation [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

No branches or pull requests

3 participants