lukaskleinschmidt / kirby-sortable

Making subpage managing a breeze
79 stars 6 forks source link

Undefined property field::options #11

Closed Thiousi closed 7 years ago

Thiousi commented 8 years ago

I've just installed the latest version of the plugin and the field and get an error in the panel:

Notice: Undefined property: Kirby\Panel\Models\Page\Blueprint\Field::$options in D:\Git\Natasa\site\fields\modules\controller.php on line 9
Warning: array_filter() expects parameter 1 to be array, null given in D:\Git\Natasa\site\fields\modules\controller.php on line 69

As far as I can tell, everything is working fine except for that part :(

Here's my blueprint. I have tried with just label and type and with every combination of options I could think of:

  modules:
    label: Sections
    type: modules
    style: items
    readonly: false
    options:
      redirect: false
      preview: true
      delete: true
      limit: null
      edit: true
lukaskleinschmidt commented 8 years ago

I will take a look at this

Thiousi commented 8 years ago

In a weird twist, rebooting my computer and relaunching everything fixed this ... Sorry I can't provide more information to help with this !

lukaskleinschmidt commented 8 years ago

Odd one. I'll try to poke around to see if I can reproduce this somehow. Do you register the modules with the new regestry?

Thiousi commented 8 years ago

Nope, I've just upgraded from an old version of both your field and the plugin to the latest version of both but haven't tried out the registry yet.

Andi-Lo commented 8 years ago

I got the same error:

bug

  modules:
    label: Modules
    type: modules

I can remove the error when I add the options field into the blueprint.

  modules:
    label: Modules
    type: modules
    options:
      limit: null

This does work.

lukaskleinschmidt commented 8 years ago

Thanks for the heads up. Was a quick fix in the end. 👍

Andi-Lo commented 8 years ago

@lukaskleinschmidt I'm not sure if this update did cause some other bug?

Now it states that I don't have any modules (while I did before)

bug

Anyone can relate?

Edit: Okay now they are getting displayed again. Strange. Maybe it was some caching issue.