Help to debug php error `Undefined index: type`

Hi there…

As some of you may know I’m the author of “Enhanced Link Toolbar Dialog”.

Some people are complaining that the Plugin does not work anymore with Kirby 3.4.0 but for gods sake, I’m not able to reproduce this issue. Therefore I’ve no idea what the heck is going on maybe someome has an Idea what this issue is about?

Undefined index: type

This Plugin makes use of custom models and I most likely miss something important here. Any help is very very much appriciated!

Read more here: https://github.com/gearsdigital/enhanced-toolbar-link-dialog/issues/15

you are refering to a field, that is not defined (yet)
e.g. $page[‘bla’][‘type’]
but the variable onyl has $page[‘bla’][‘field’]
You need to check this before using this variable

Not sure that this is the issue. I assume that this relates to the costum model thingy. If I add a ‘type’ the error is gone but no data is collected.

'models' => [
        'simplepagemodel' => [
            'type' => "simplepagemodelcollection",
            ],
        ],
    ],
    'collections' => [
        'simplepagecollection' => [
            'type' => "simplepagemodelcollection",
            'model' => 'simplepagemodel',
        ],
    ],
],

We found the root cause. It was a missing type declartion: https://github.com/gearsdigital/enhanced-toolbar-link-dialog/issues/15#issuecomment-655984243

But I’m still not sure why this is neccessary. Maybe @distantnative or @texnixe can shed some light about custom models?