Home/ Documentation/ WordPress/ Blocks/ Plugin compatibility issues

Plugin compatibility issues

A discussion of compatibility issues with various WordPress plugins.

Invalid arguments error with dynamic blocks Block Control plugin

Are you getting this error when adding a dynamic PHP block to the page?

Block Control does not correctly implement support for dynamic blocks that use ServerSideRenderers. The plugin fails to register their additional block attributes with the PHP filter register_block_type_args.

On the other hand, Block Visibility plugin does that. Not with the filter, but it goes through all registered blocks and adds their attributes. See the comment in class-block-visibility.php on line 142:

/**
	 * This is needed to resolve an issue with blocks that use the
	 * ServerSideRender component. Registering the attributes only in js
	 * can cause an error message to appear. Registering the attributes in
	 * PHP as well, seems to resolve the issue. Ideally, this bug will be
	 * fixed in the future.
	 *

Solutions:

  • Ask plugin authors to support dynamic blocks that are rendered on the server side
  • Or, use only JS blocks with these plugins

Your issue is not on the list?

Check out our forum and if you can’t find the solution there, contact our support team.



Last updated on April 7, 2022 at 10:05 am


Print this article