Hey there.
Real problem, I tried the - great, no question - fieldtoggle plugin. So, in order to use the plugin, I did this:
title: Template title
pages: false
files: false
fields:
title:
label: Title
type: text
toggle:
label: Toggle label
type: fieldtoggle
But, and I guess this is because I used the blueprint field name toggle, every panel page (that’s using this specific template) that I visited while this field was active, is throwing the following error:
Too few arguments to function Kirby\Panel\Models\Page::toggle(),
0 passed in build/panel/app/src/panel/models/page/changes.php on line 71 and exactly 1 expected
I removed the plugin, checked if the toggle field was present in any content file - nothing. Is this a bug?
I’m pretty sure something was in your cache while you tested it with the removed/renamed blueprint field. There are some names you can not use in the panel, as they are reserved for other functions.
Could you please test it again with a different field name?
The site I’m working on resides in a private Bitbucket repo. I didn’t commit or push fieldtoggle (installed as submodule) nor the blueprint. Strangely, the problem persisted after cloning this “untainted” version.
Do kirby & panel keep some cache of their own? I mean, even if they do, I already did a fresh install via git clone private-bitbucket-repo.git --recursive. Maybe PHP cache? Don’t think my development server (simple php -s localhost:8080) would ever do something like this to me!