# Error when saving page

**URL:** <https://forum.getkirby.com/t/error-when-saving-page/7655>\
**Category:** Questions\
**Tags:** v2\
**Created:** [June 3, 2017, 2:09pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655 "2017-06-03T14:09:02Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucask](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lucask](https://forum.getkirby.com/u/lucask)\
**Post date:** [June 3, 2017, 2:09pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/1 "2017-06-03T14:09:02Z")

</div>

Hi,  
for some reason I can not save any changes on subpages of a specific parent page.

The error:

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

I can save the subpages from other parent pages without any problems.  
I have already reinstalled kirby (2.4.1) and regenerated all pages. Still the same error.

So what could be the problem here?

---

<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:** [June 3, 2017, 2:33pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/2 "2017-06-03T14:33:38Z")

</div>

Could you please post the blueprint of the parent page?

---

<div class="post-metadata">

**Author:** ![lucask](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lucask](https://forum.getkirby.com/u/lucask)\
**Post date:** [June 3, 2017, 2:41pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/3 "2017-06-03T14:41:30Z")

</div>

Sure.

```
title: Akademie
pages:
  template: Ausbildung
files: true
fields:
  title:
    label: Title
    type: text
  text:
    label: Einleitungstext
    type: textarea
  header_image:
    label: Titelbild
    type: image
  quotes:
    label: Stimmen
    type: structure
    fields:
      text:
        label: Text
        type: textarea
      author:
        label: Verfasser
        type: textarea
```

---

<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:** [June 3, 2017, 3:36pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/4 "2017-06-03T15:36:47Z")

</div>

Hm, that looks ok, what about the Ausbildung template?

---

<div class="post-metadata">

**Author:** ![lucask](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lucask](https://forum.getkirby.com/u/lucask)\
**Post date:** [June 3, 2017, 6:21pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/5 "2017-06-03T18:21:46Z")

</div>

Do you think the parent page is the problem?

Here is the template code:

```
<?php snippet('header') ?>

    <main class="main theme-blue default-page training-detail" role="main">

        <!-- SECTION WELCOME -->
        <section class="page-header">
            <div class="row row-padding">

                <div class="large-12 column one-of-two-column">
                    <div class="headline-border-wrapper-h1">
                        <h1><?php echo $page->title()->html() ?></h1>
                        <div class="headline-border"></div>
                    </div>
                </div>

                <div class="large-6 medium-6 column one-of-two-column kirbytext">
                    <?php echo $page->text()->kirbytext() ?>
                </div>

                <div class="large-6 medium-6 column one-of-two-column kirbytext">
                    <table class="training-table">
                        <tr>
                            <td class="training-table-title">Art</td>
                            <td><?php echo $page->type(); ?></td>
                        </tr>
                        <!--
                        <tr>
                            <td class="training-table-title">Zeit</td>
                            <td><?php echo $page->date_from() . ' - ' . $page->date_to(); ?></td>
                        </tr>
                        -->
                        <tr>
                            <td class="training-table-title">Zielgruppe</td>
                            <td><?php echo $page->target(); ?></td>
                        </tr>
                        <tr>
                            <td class="training-table-title">Umfang</td>
                            <td><?php echo $page->duration(); ?></td>
                        </tr>
                        <tr>
                            <td class="training-table-title">Termine</td>
                            <td><?php echo $page->dates(); ?></td>
                        </tr>
                        <tr>
                            <td class="training-table-title">Leitung</td>
                            <td><?php echo $page->leader(); ?></td>
                        </tr>
                    </table>
                </div>

            </div>
        </section>

        <!-- SECTION CONTACT FORM -->
        <section class="row row-padding">

            <div class="large-12 column row-padding one-of-two-column">
                <div class="headline-border-wrapper-h3">
                    <h3><?php echo l::get('join') ?></h3>
                    <div class="headline-border"></div>
                </div>
            </div>

            <div class="form-wrapper">
                <div class="large-6 medium-6 column row-padding one-of-two-column">
                    <?php if (strcmp($page->toggle(), 'false') !== 0) { ?>
                        <?php snippet('ausbildung_form'); ?>
                    <?php } else { ?>
                        <p>Anmeldungen zur Zeit nicht möglich.</p>
                    <?php } ?>
                </div>

                <div class="large-6 medium-6 column row-padding one-of-two-column">
                    <?php if (strcmp($page->comments(), '') !== 0) { ?>
                        <div class="form-item clearfix">
                            <div class="special-label">Anmerkungen/Kommentare</div>
                        </div>

                        <div class="training-comment">
                            <?php echo $page->comments()->kirbytext(); ?>
                        </div>
                    <?php } ?>
                </div>
            </div>

        </section>

    </main>

<?php snippet('footer') ?>
```

---

<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:** [June 3, 2017, 11:01pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/6 "2017-06-03T23:01:11Z")

</div>

No, the template is irrelevant, it has nothing to do with the Panel. I meant the blueprint, sorry!

---

<div class="post-metadata">

**Author:** ![lucask](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lucask](https://forum.getkirby.com/u/lucask)\
**Post date:** [June 6, 2017, 4:58pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/7 "2017-06-06T16:58:32Z")

</div>

okay 😃  
This is the Ausbildung template:

```
title: Ausbildung
pages: false
files: true
fields:
  title:
    label: Title
    type: text
  order:
    label: Reihenfolge (höchste Zahl oben)
    type: number
  excerpt:
    label: Kurzfassung
    type: textarea
  text:
    label: Text
    type: textarea
  type:
    label: Art
    type: text
  type:
    label: Art
    type: text
  target:
    label: Zielgruppe
    type: text
  duration:
    label: Dauer
    type: text
  dates:
    label: Termine
    type: text
  leader:
    label: Leitung
    type: text
  tags:
    label: Schlagwörter (mit , trennen)
    type: tags
    lower: true
  toggle:
    label: Anmeldeformular aktivieren?
    type: toggle
    text: yes/no
  comments:
    label: Anmerkungen
    type: textarea
```

---

<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:** [June 6, 2017, 5:08pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/8 "2017-06-06T17:08:14Z")

</div>

I tested this and the problem seems to be the name of the toggle field, try to rename it to something else, maybe togglefield.

Also, you have two fields called type, rename one of them or delete, if that was created in error.

---

<div class="post-metadata">

**Author:** ![lucask](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lucask](https://forum.getkirby.com/u/lucask)\
**Post date:** [June 6, 2017, 5:19pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/9 "2017-06-06T17:19:28Z")

</div>

Ups, I think this could be the problem. Thank you!

I will try it tomorrow and tell you about the result.

---

<div class="post-metadata">

**Author:** ![lucask](https://avatars.discourse-cdn.com/v4/letter/l/a87d85/32.png) [@lucask](https://forum.getkirby.com/u/lucask)\
**Post date:** [June 7, 2017, 5:24pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/10 "2017-06-07T17:24:59Z")

</div>

Thank you so much! Everything is working great now 🙂

---

<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, 4:49pm UTC](https://forum.getkirby.com/t/error-when-saving-page/7655/11 "2025-02-06T16:49:47Z")

</div>


