# Toggle Causing Error in Panel?

**URL:** <https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072>\
**Category:** Questions\
**Tags:** v2\
**Created:** [August 21, 2018, 11:30am UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072 "2018-08-21T11:30:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackclarke](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jackclarke/32/3964_2.png) [@jackclarke](https://forum.getkirby.com/u/jackclarke)\
**Post date:** [August 21, 2018, 11:30am UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/1 "2018-08-21T11:30:23Z")

</div>

Hi there, I am building a site and was testing out a toggle feature in a blueprint & in the panel – however it seems to have thrown an error in the cms?

The error I get is:

> Missing argument 1 for Kirby\Panel\Models\Page::toggle(), called in […]/site/panel/app/src/panel/models/page/changes.php on line 71 and defined

I have since removed the toggle field from my blueprint however it is still throwing the error? I don’t really know how this is possible or how to fix it 😓

My current blueprint is:

```
title: Full Text

icon: text-width

pages: false
files: false

options:
  template: false
  url: false
  preview: false

fields:
  title:
    label: Title
    required: true
    type: text

  text:
    label: Text
    required: true
    type: textarea
    required: true
    icon: align-left

```

And the toggle aspect I added which broke the panel page was:

```
  toggle:
    label: Invert colours?
    type: toggle
    text: yes/no

```

I am running Kirby 2.4.1

---

<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:** [August 21, 2018, 4:59pm UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/2 "2018-08-21T16:59:41Z")

</div>

This is an issue with the field name. If you rename “toggle” to something like “myToggle” or “isInverted” or whatever, it will work.

---

<div class="post-metadata">

**Author:** ![anon77445132](https://avatars.discourse-cdn.com/v4/letter/a/4da419/32.png) [@anon77445132](https://forum.getkirby.com/u/anon77445132)\
**Post date:** [August 21, 2018, 6:48pm UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/3 "2018-08-21T18:48:45Z")

</div>

You should also update Kirby and the Panel. This does not solve your problem, but the version should always be up to date.  
Today it is 2.5.12.

---

<div class="post-metadata">

**Author:** ![jackclarke](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jackclarke/32/3964_2.png) [@jackclarke](https://forum.getkirby.com/u/jackclarke)\
**Post date:** [August 22, 2018, 11:58am UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/4 "2018-08-22T11:58:52Z")

</div>

Thanks so much @texnixe – is this just a problem with the toggle feature? Or should I steer clear from naming fields by their type on the whole?

---

<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:** [August 22, 2018, 12:13pm UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/5 "2018-08-22T12:13:47Z")

</div>

As far as I’m aware, the problem in the Panel is particularly an issue with the toggle field.

However, it makes sense to use field names that are not used as native Kirby page methods, because they will conflict, see the docs:

[https://getkirby.com/docs/panel/blueprints/form-fields#field-names](https://getkirby.com/docs/panel/blueprints/form-fields#field-names)

---

<div class="post-metadata">

**Author:** ![samuellinde](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/samuellinde/32/5214_2.png) [@samuellinde](https://forum.getkirby.com/u/samuellinde)\
**Post date:** [November 7, 2018, 11:14am UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/6 "2018-11-07T11:14:44Z")

</div>

Just ran into this issue myself. Might want to update the documentation so the example doesn’t suggest using “toggle” as the field name. 🙂

---

<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:** [November 7, 2018, 11:19am UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/7 "2018-11-07T11:19:19Z")

</div>

Yes, done (and some more chars)

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:25pm UTC](https://forum.getkirby.com/t/toggle-causing-error-in-panel/11072/8 "2025-02-06T17:25:49Z")

</div>


