Hi, I’ve done some quick testing with a vanilla block plugin generated by Pinegrow in the latest WordPress release candidate (version 6.4). I wanted to check if it would work, but for my surprise, it simply doesn’t show up in the block inserter. Only an error message appears:
“Your site doesn’t include support for the “pinegrow-block/pinegrow-block” block. You can leave this block intact or remove it entirely.”
Here’s a video with the test.
The issue is that
lodash, but WordPress now removes it.
I could make the block appear by adding
lodash as a dependency in the
wp_register_script function for the
pg-blocks-controls.js file in
But probably this isn’t a proper solution, according to this comment from the Gutenberg repo.
$base_url . 'blocks/pg-blocks-controls.js',
array('wp-blocks', 'wp-block-editor', 'wp-server-side-render', 'wp-media-utils', 'wp-data', 'wp-element', 'lodash'), $reg_args[ 'version' ]);
I thought you would like to know. WP 6.4 is coming next November, so there’s time for a fix.
@marc_io thanks for the report! We’ll publish an update for this next week.
@marc_io, you are a true hero! I’m not happy about the way WP is quietly deprecating things and I’m definitely not happy about having to re-export all my projects but I’m thankful that you found this and brought it to Pinegrow’s attention.
@adamslowe Thanks, we’re all in the same boat here. It’s been a lot of work to keep up with these constant changes, it’s almost a full time job, really. Let’s hope things start to settle a bit more, and kudos for the Pinegrow team to stay in this unstable game.
@marc_io @adamslowe we will have two ways to fix this:
- By re-exporting projects with the next release of Pinegrow
- By installing a simple WordPress plugin that will insure older blocks are compatible with WordPress 6.4. The plugin is available now, please try it if you can: Release 1.0.0 · Pinegrow/LoadLodashForPinegrowBlocks · GitHub
The plugin adds lodash as a dependency for the pg-blocks-controls script.
The option 2 is easy and quick, and gives you time to reexport existing projects without hurry.
Options 1 and 2 can be used together on a single site.
Thanks for providing the plugin solution so quickly, @matjaz. I’ve tested it with WordPress version 4.6-RC2, and it works fine.