# Array\_key\_exists() expects parameter 2 to be array, string given (Kirby-builder)

**URL:** <https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914>\
**Category:** Questions\
**Created:** [April 24, 2019, 10:36am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914 "2019-04-24T10:36:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivorthedesigner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ivorthedesigner/32/2919_2.png) [@ivorthedesigner](https://forum.getkirby.com/u/ivorthedesigner)\
**Post date:** [April 24, 2019, 10:36am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/1 "2019-04-24T10:36:28Z")

</div>

I’m using the kirby-builder plugin from @timoetting but getting the error mention above in the panel. Any ideas as what it means and how to get rid of it?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 24, 2019, 10:43am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/2 "2019-04-24T10:43:09Z")

</div>

Could you please post your blueprint?

---

<div class="post-metadata">

**Author:** ![ivorthedesigner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ivorthedesigner/32/2919_2.png) [@ivorthedesigner](https://forum.getkirby.com/u/ivorthedesigner)\
**Post date:** [April 24, 2019, 10:50am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/3 "2019-04-24T10:50:28Z")

</div>

```auto
    columns:
     - width: 1/1
      fields:
      # inside the fields section of your blueprint:
        mybuilder:
          label: Page Builder
          type: builder
          columns: 1 # Optional. If set to 2 or more, the builder blocks will be placed in a grid.
          max: 10 # Optional. Limits the number of builder blocks that can be added.
        fieldsets:
          quote: # This is a field set. It contains a group of kirby fields. The user can select from these sets to build the content.
            label: Quote
            preview: # Optional. If defined, a preview of the block can be rendered by the specified snippet from within the snippets folder.
              snippet: blocks/quote
              css: /assets/css/blocks/quote.css
            fields:
              text:
                label: Quote Text
                type: textarea
              citation:
                label: Citation
                type: text
          bodytext:
            label: Text
            tabs: # Optional. Tabs can be used to group the fields of a field set. In this example, we use one tab to contain the content related fields and one for styling settings. It makes no difference for the content handling in the template if there are tabs or not.
              content:
                label: Content
                icon: edit # Optional. This icon appears next to the tab. The icon name can be chosen from the Kirby's icon set getkirby.com/docs/reference/ui/icon
                fields:
                  text:
                    label: text
                    type: textarea
              style:
                label: Style
                icon: cog
                fields:
                  fontfamily:
                    label: Font
                    type: select
                    options:
                      helvetica: Helvetica
                      comicsans: Comic Sans
                  fontsize:
                    label: Font Size
                    type: number
          events:
            label: Events
            preview:
              snippet: blocks/events
              css: /assets/css/blocks/events.css
            fields:
              eventlist: # The Builder Field can even be nested!
                type: builder
                label: Event List
                columns: 2
                fieldsets:
                  event:
                    label: Event
                    fields:
                      title:
                        label: Title
                        type: text
                      text:
                        label: Description
                        type: textarea
                      date:
                        label: Date
                        type: date
          calltoaction:
            #extends: blocks/calltoaction

```

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 24, 2019, 10:53am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/4 "2019-04-24T10:53:45Z")

</div>

Your indentation looks wrong, the field sets should be indented…, also, columns and max currently don’t seem to work

> <https://github.com/TimOetting/kirby-builder/issues/114>

---

<div class="post-metadata">

**Author:** ![ivorthedesigner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ivorthedesigner/32/2919_2.png) [@ivorthedesigner](https://forum.getkirby.com/u/ivorthedesigner)\
**Post date:** [April 24, 2019, 10:59am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/5 "2019-04-24T10:59:44Z")

</div>

Thanks for the quick reply. I did copy the code directly from the repo. I think when I pasted it here it didn’t intent correctly

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 24, 2019, 11:05am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/6 "2019-04-24T11:05:08Z")

</div>

The code from the readme throws the error mentioned in the thread I linked to, you have to remove the max and column settings to make it work. After removing them, it should work.

---

<div class="post-metadata">

**Author:** ![ivorthedesigner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ivorthedesigner/32/2919_2.png) [@ivorthedesigner](https://forum.getkirby.com/u/ivorthedesigner)\
**Post date:** [April 24, 2019, 11:07am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/7 "2019-04-24T11:07:45Z")

</div>

Ok I removed columns and width but now get ’ The field type **“mybuilder”** does not exist’

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 24, 2019, 11:12am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/8 "2019-04-24T11:12:20Z")

</div>

Please make sure that your indentation is correct, exactly like in the readme.

---

<div class="post-metadata">

**Author:** ![ivorthedesigner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ivorthedesigner/32/2919_2.png) [@ivorthedesigner](https://forum.getkirby.com/u/ivorthedesigner)\
**Post date:** [April 24, 2019, 11:23am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/9 "2019-04-24T11:23:50Z")

</div>

I’ve created a new .yml page with only the blueprint code from the readme file minus the column and width, and still weirdly get the same error ☹

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 24, 2019, 11:27am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/10 "2019-04-24T11:27:23Z")

</div>

Don’t remove the columns and width, but the `max`and `columns` setting from after `type: builder`.

---

<div class="post-metadata">

**Author:** ![ivorthedesigner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/ivorthedesigner/32/2919_2.png) [@ivorthedesigner](https://forum.getkirby.com/u/ivorthedesigner)\
**Post date:** [April 24, 2019, 11:29am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/11 "2019-04-24T11:29:19Z")

</div>

My apologies I meant max and columns.

---

<div class="post-metadata">

**Author:** ![timoetting](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/timoetting/32/781_2.png) [@timoetting](https://forum.getkirby.com/u/timoetting)\
**Post date:** [May 3, 2019, 3:41am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/12 "2019-05-03T03:41:24Z")

</div>

Hey @ivorthedesigner,

the problem with your blueprint are the last two lines. You start a new fieldset `calltoaction` but leave it empty because the following line is commented out. Make sure to comment or delete the line `calltoaction` aswell

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [May 3, 2019, 5:54am UTC](https://forum.getkirby.com/t/array-key-exists-expects-parameter-2-to-be-array-string-given-kirby-builder/13914/13 "2019-05-03T05:54:23Z")

</div>

@timoetting I had removed that those lines when I tested, but strangely can’t reproduce the error now. Maybe there was still something in the cache after removing.
