# Bug with Gutenberg block generated by Pinegrow

**URL:** <https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656>\
**Category:** Pinegrow WP\
**Tags:** bug, wordpress, blocks, gutenberg, plugin\
**Created:** [January 19, 2023, 10:48am UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656 "2023-01-19T10:48:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![itsmeleo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/itsmeleo/32/19_2.png) [@itsmeleo](https://forum.pinegrow.com/u/itsmeleo)\
**Post date:** [January 19, 2023, 10:48am UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/1 "2023-01-19T10:48:53Z")

</div>

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.

 ![Screenshot (7)](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/4/4351be1a66ea621d71dc1c834df50cfd1d971b21.png)

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

 ![Screenshot (8)](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/9/9cfd3591f9935d497f785699343ec4d8fbceab2b.png)

 ![Screenshot (10)](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/2/2d9fd69c50c1664e2bb84e351429b59d0a472480.png)

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

Thanks

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [January 19, 2023, 4:39pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/2 "2023-01-19T16:39:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![itsmeleo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/itsmeleo/32/19_2.png) [@itsmeleo](https://forum.pinegrow.com/u/itsmeleo)\
**Post date:** [January 19, 2023, 4:54pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/3 "2023-01-19T16:54:23Z")

</div>

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

Thanks for the quick reply

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [January 20, 2023, 4:23pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/4 "2023-01-20T16:23:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jonroc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jonroc/32/2805_2.png) [@jonroc](https://forum.pinegrow.com/u/jonroc)\
**Post date:** [January 20, 2023, 6:55pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/5 "2023-01-20T18:55:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![itsmeleo](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/itsmeleo/32/19_2.png) [@itsmeleo](https://forum.pinegrow.com/u/itsmeleo)\
**Post date:** [January 20, 2023, 7:12pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/6 "2023-01-20T19:12:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [January 21, 2023, 3:50pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/7 "2023-01-21T15:50:57Z")

</div>

> [@jonroc](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![jonroc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jonroc/32/2805_2.png) [@jonroc](https://forum.pinegrow.com/u/jonroc)\
**Post date:** [January 21, 2023, 3:57pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/8 "2023-01-21T15:57:59Z")

</div>

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:

```auto
<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>

```

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [January 22, 2023, 5:19pm UTC](https://forum.pinegrow.com/t/bug-with-gutenberg-block-generated-by-pinegrow/7656/9 "2023-01-22T17:19:45Z")

</div>

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