• Resolved Spiffy Plugins

    (@spiffyplugins)


    This plugin adds some attributes to all blocks, which breaks other plugins due to incompatibility. I traced it to this block of code in tpgb_conditions_rules.php line 49:

    	public function register_block_for_server_side_attr(){
    		$registered_blocks = WP_Block_Type_Registry::get_instance()->get_all_registered();
    		$display_rules_options = self::tpgb_display_option();
    		
    		foreach ( $registered_blocks as $name => $block ) {
    			if (!preg_match('/\btpgb\/\b/', $name) && !preg_match('/\bstackable\/\b/', $name)) {
    				foreach( $display_rules_options as $key => $attr){
    					$block->attributes[$key] = $attr;
    				}
    			}
    		}
    		
    	}

    Why is this plugin modifying blocks belonging to other plugins?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author POSIMYTH

    (@posimyththemes)

    @spiffyplugins Thanks for the mention. We have forwarded this to our senior developers, We will get back to you with all in-depth details on this.

    Plugin Author POSIMYTH

    (@posimyththemes)

    @spiffyplugins That code we have added to give DISPLAY CONDITION options to each Gutenberg block. But, As You are having some issues with that, We have revamped that code and put a condition to add that DISPLAY CONDITIONS to only compatible plugins. So, It will not be visible now at your end.

    You may ask your users to update to our latest version, Version number is 1.2.3 and they will get a solution of that.

    Thanks for your submission and hopefully now all things will be good at your end. Still, If you face any issue, Feel free to reach us.

    Thread Starter Spiffy Plugins

    (@spiffyplugins)

    It works okay on the front end now, but the backend will no longer display the block. Instead it gives the following error:

    Error loading block: Invalid parameter(s): attributes

    Looking through the console error, I see this:

    {code: "rest_invalid_param", message: "Invalid parameter(s): attributes",…}
    code: "rest_invalid_param"
    data: {status: 400, params: {attributes: "tpgbDisrule is not a valid property of Object."},…}
    details: {attributes: {code: "rest_additional_properties_forbidden",…}}
    params: {attributes: "tpgbDisrule is not a valid property of Object."}
    attributes: "tpgbDisrule is not a valid property of Object."
    status: 400
    message: "Invalid parameter(s): attributes"
    Thread Starter Spiffy Plugins

    (@spiffyplugins)

    I installed your plugin fresh and did not change any default settings.

    I tested again using the Health Check & Troubleshooting plugin to isolate the problem. With the default theme and only your plugin enabled, I tried to insert a WordPress standard Widget > Calendar block and get the same error message:

    Error loading block: Invalid parameter(s): attributes

    There are a lot of messages logged in the console from tpgb-blocks-editor.min.js?ver=1.2.3:1

    Hope this helps you reproduce the issue on your site!

    Hi @spiffyplugins

    Please see this link here https://prnt.sc/26ixpjo as the fix is already done on the latest version of the plus blocks.

    Please check and let us know if we can be of further assistance.

    Regards,

    Thread Starter Spiffy Plugins

    (@spiffyplugins)

    I tested again this morning with WordPress 4.8.3 and the problem seems to be fixed. Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘This plugin modifies the attributes of other blocks’ is closed to new replies.