Thanks for the great feedback, it is appreciated.
So for the dependency error, are you using the default theme?
Hello,
Sorry should have mention my settings. Yep, Default Theme.
Screenshots of the settings: https://imgur.com/a/hegbTIK
Regards.
Thanks.
I will test with the latest default theme, Twenty Twenty One, and see if there is anything that can be done. I’m thinking at this point that, if the styles are required by the theme (any theme), then you will want to keep the “Disable the Prismatic block stylesheet” setting unchecked.
Not sure though, will take a closer look for the next update.
Oh okay, you meant WordPress theme! I’m using a custom theme.
I’ve dig up a bit, and it looks like the problem come from the register_block_type() in /inc/prismatic-blocks.php:39.
When using the “Disable the Prismatic block stylesheet on the frontend” setting, it deregister the style, but after that, the block type cannot correctly retrieve the prismatic-blocks style handle. This is what trigger the notice.
I had a similar problem in the past. A way to deregister a style without breaking dependencies is to deregister the style, and then re-register it without any path.
In short here is a fix that works:
In the file /inc/prismatic-core.php:231:
if ($disable) {
wp_deregister_style('prismatic-blocks');
// Fix handle for block type
wp_register_style('prismatic-blocks', false);
}
Boom! The block type no longer throw a notice, since the handle exists, but it still won’t enqueue anything.
Have a nice day!
Regards.
Brilliant, thank you for the help Konrad. I will verify and implement this solution in the next plugin update. Cheers!
Just to follow up with this, your solution is implemented in the next version of the plugin (v2.7). Should be available today or tomorrow. Thanks again for the help with this, Konrad.