Title: Breaks flex-posts block.
Last modified: November 18, 2019

---

# Breaks flex-posts block.

 *  Resolved [Brian Henry](https://wordpress.org/support/users/brianhenryie/)
 * (@brianhenryie)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/)
 * Hey,
 * Really nice plugin, but… when enabled it breaks the Flex Posts plugin.
    [https://wordpress.org/plugins/flex-posts/](https://wordpress.org/plugins/flex-posts/)
 * Also noted by another user:
    [https://wordpress.org/support/topic/error-loading-block-invalid-parameters-attributes/](https://wordpress.org/support/topic/error-loading-block-invalid-parameters-attributes/)
 * When Flex Posts makes its API call, the difference between having Blocks CSS 
   enabled or not is the addition of two parameters:
 *     ```
       &attributes[hasCustomCSS]=false
       &attributes[customCSS]=
       ```
   
 * And returns:
 *     ```
       {
       	"code": "rest_invalid_param",
       	"message": "Invalid parameter(s): attributes",
       	"data": {
       		"status": 400,
       		"params": {
       			"attributes": "hasCustomCSS is not a valid property of Object."
       		}
       	}
       }
       ```
   
 * Which is in WordPress’s `rest_validate_value_from_schema()` `rest-api.php:1266`.
 * Basically, the validation fails for any property that isn’t in Flex Posts schema.

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12144849)
 * Hey [@brianhenryie](https://wordpress.org/support/users/brianhenryie/),
 * As you will see in that other ticket, it’s an issue with Gutenberg and we’ve 
   reported that to the Gutenberg team: [https://github.com/WordPress/gutenberg/issues/16850](https://github.com/WordPress/gutenberg/issues/16850)
 * We really can’t do much until they solve it. The one solution for you will be
   to use Group Block and put your Flex Posts Block inside it and then using CSS
   to customize the Group Block.
 * Let me know if it works for you. 🙂
 *  Thread Starter [Brian Henry](https://wordpress.org/support/users/brianhenryie/)
 * (@brianhenryie)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12148481)
 * I’ll follow the issue on GitHub, thank you.
 * I was also going to request a feature of having document level CSS.
    That would
   allow for another workaround, where the native “Additional CSS Class(es)” field
   could be used to apply styles defined there.
 * You might consider proposing a filter in `WP_Block_Type->prepare_attributes_for_render()`
   where your plugin could then remove the fields you have added, before they trigger
   a problem.
 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12149110)
 * Hey,
 * The issue is that this only happens with the blocks which are using ServerSideRenderer
   and we can’t really know in the front which blocks were using the ServerSideRenderer.
 * The issue shouldn’t happen in the front-end, technically speaking, but it happens
   because ServerSideRenderer React component isn’t to support additional props.
 * All we can do is wait and hope they will notice the ticket and then we can think
   of a solution.
 * Let me know your thoughts. 🙂
 *  Thread Starter [Brian Henry](https://wordpress.org/support/users/brianhenryie/)
 * (@brianhenryie)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12157342)
 * I made a PR on GitHub with a fix that seems to work well:
 * [https://github.com/Codeinwp/blocks-css/pull/5](https://github.com/Codeinwp/blocks-css/pull/5)
 *  Plugin Author [Hardeep Asrani](https://wordpress.org/support/users/hardeepasrani/)
 * (@hardeepasrani)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12158553)
 * Hey [@brianhenryie](https://wordpress.org/support/users/brianhenryie/),
 * Can you send the PR on this repostiroy against the development branch? [https://github.com/Codeinwp/gutenberg-css/](https://github.com/Codeinwp/gutenberg-css/)
 *  [Derrick Hammer](https://wordpress.org/support/users/pcfreak30/)
 * (@pcfreak30)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12174221)
 * [@hardeepasrani](https://wordpress.org/support/users/hardeepasrani/) this issue
   seems to affect [https://github.com/getblocklab/block-lab/issues/480](https://github.com/getblocklab/block-lab/issues/480)
   which I can see you are involved in with [https://wordpress.org/support/topic/causing-other-blocks-to-not-load-in-editor/](https://wordpress.org/support/topic/causing-other-blocks-to-not-load-in-editor/).
 * Overall it seems to come down to the same issue. Thought you should be aware.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Breaks flex-posts block.’ is closed to new replies.

 * ![](https://ps.w.org/blocks-css/assets/icon-256x256.jpg?rev=2030330)
 * [Blocks CSS: CSS Editor for Gutenberg Blocks](https://wordpress.org/plugins/blocks-css/)
 * [Support Threads](https://wordpress.org/support/plugin/blocks-css/)
 * [Active Topics](https://wordpress.org/support/plugin/blocks-css/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/blocks-css/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/blocks-css/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [Derrick Hammer](https://wordpress.org/support/users/pcfreak30/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/breaks-flex-posts-block/#post-12174221)
 * Status: resolved