Bug with Gutenberg block generated by Pinegrow

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.

  1. Pinegrow where I’m showing that I’m adding attributes for buttons to change its text, classes, and design.

  2. showing notice screenshot of Wordpress page where i added the form.

  1. my vscode screen shot where i manually changed TEXT type to STRING

I’m sure it will be fixed in the next update of Pinegrow

Thanks

@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?

In the meantime I’ll change the type to string.

@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 :slight_smile:

Thanks for the quick reply

2 Likes

Really surprised how we could have missed this one for so long :slight_smile:

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.

actually, my concern is that “text” is not the suitable data type it should only be builtin data type as you can see in the second screenshot where I show notice on the page

I hope you understand.

1 Like

@jonroc this should work (the problem with bck image attribute was fixed in the latest 7.1). What kind of attribute are you adding to the top block element?

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
Flex=d-flex
Inline block=d-inline-block
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>
</div>

Thanks @jonroc, it is fixed now, out in the next release.

1 Like