I’m working on creating a contact form using Gutenberg block in Pinegrow, the form Is working perfectly fine, the problem arises when I try to add attributes to make changes, at that time pinegrow registers the block attribute type as text whereas Wordpress gives notice that it should not be text, either it should be string, array, object, null, etc but it shouldn’t be type text so I manually changed the PHP file and modify the text attribute type property to string than notice is removed.
I have attached here 3 screenshots for reference.
Pinegrow where I’m showing that I’m adding attributes for buttons to change its text, classes, and design.
@itsmeleo thanks for the report. Indeed the correct type is string, not text. What confuses me is that so far we haven’t run into this issue. Are you using any special settings, validation plugins, WP beta version on your site?
@matjaz i’m using latet version of wordpress which Is 6.1.1 and there is no other plugin installed and this is not error but its a notice, and only displayed when you enabled debugged mode wp_debug true in your wp-config.php file, which i always do because i mostly work on my own development environment and i want to keep myself error, warning and notices of deprecated or message like this to be free
Hum, this may explain why you can’t add a text attribute directly to the same element as the block is assigned to. I’ve always had to make an inner child div to assign the text attribute for it work properly. Hopefully, this fixes that bug as well.
Hi, when I add any text element as the content attribute to the top level block then you can’t edit the text and it performs oddly. Here I wanted to make a simple block that was just a span block for a single line of text (because the core/paragraph adds padding to bottom) but I’m not able to do it in one element. I have to nest the <span> in the outermost block div to be able to edit the text. Here is the block code:
<div cms-block="single-text" cms-block-title="Text (Single Line)" cms-block-description="This text will not be in a paragaph tag." cms-block-category="text" cms-block-supports="color.text,typography.fontSize,align,color.link" class="d-inline-flex singleText" cms-block-field="display" cms-block-field-title="Select Display Type" cms-block-field-type="class" cms-block-field-class-replace="d-inline-flex" cms-block-field-control="select" cms-block-field-values="Inline Flex=d-inline-flex
Block=d-block" cms-block-field-default-value="d-inline-flex"><span cms-block-field="text" cms-block-field-title="Enter Text Here" cms-block-field-type="content" cms-block-field-control="richtext">Enter a line of Text</span>