You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attributes serialized into the block's content are not parsed server-side. Only the comments attributes are. There are some explorations about moving all the parsing server-side. I'm closing this as duplicate fo #2751
I don't understand what do you mean about the "comments attributes". But I fix my problem by make sure do not use source & selector in each attribute. Seems like what you said, any attribute with source & selector will be serialized to post_content. So the best way if anyone needs the block to be render from server side is using only type, default. (I haven't tried enum so I'm not sure)
Issue Overview
The $attributes parameter of my block server-side rendering function keeps returning me an empty array, even after saving the block in the editor.
Wordpress : v4.9.1
Gutenberg : v1.9.1
Expected Behavior
I expected to retrieve my block's attributes from the $attributes parameter.
Current Behavior
The $attributes parameter returns an empty array
Possible Solution
It looks like the callback function is called before the block is actually saved in the editor.
Code
block.js
index.php
The text was updated successfully, but these errors were encountered: