Panel, "Undefined variable: page"

I’m probably missing something pretty basic here, but I’m kind of lost at what I should be looking for. Obviously, the page variable is undefined but where is it actually used in this blueprint (site.yml)?

title: Site
columns:
  - width: 1/3
    sections:
      fields:
        maintitle:
          label: Header main title
          type: text
          required: true
          width: 1/2
        subtitle:
          label: Header tagline
          type: text
          required: true
          width: 1/2
        menu:
          type: structure
          fields:
            label:
              label: Item label
              type: text
              help: If not set, the linked page title will be used
              width: 1/2
            url:
              type: pages
              label: Internal URL
              max: 1
              width: 1/2 
        introduction:
          label: Index introduction text
          type: textarea
          buttons: false
          required: true
  - width: 1/3
    sections:
      pages:
        type: pages
        templates:
          - about
          - home
          - default
          - experience
          - notes
  - width: 1/3
    fields:
      socials:
        label: Social networks
        type: structure
        fields:
          label:
            label: Label
            type: text
          url:
            label: URL
            type: url

I don’t know what’s causing the error, but there’s something wrong with your template: The fields sections is missing the fields key:

    sections:
      fields:
        fields:
          maintitle:
            label: Header main title
            type: text
            required: true
            width: 1/2
          subtitle:
            label: Header tagline
            type: text
            required: true
            width: 1/2

Apart from that, maybe there is an error in a template?

No dice unfortunately. I even tried going back to basics and skip the columns all together:

title: Some text
fields:
    ....

It’s fully possible that there is an error in a template somewhere but I can’t see anything obvious, not errors are being shown with the debug flag active. Is there any way of getting a more thorough error in the panel? I can’t see anything particular in my localhost error logs either.

Is there anything in the browser console maybe?

See also here same error cause by an undefined variable in a snippet: Info field throws error: Undefined variable: page

I’ve had a chance to dig around some more and it seems to be related to that as well. If there is a $page undefined in the plugin, why would it throw that in the panel but not “on the page”?

That’s a good question, maybe it only throws a warning on the frontend but not a fatal error. The more interesting question is why it is somehow called in the Panel in this context-

I actually remade the plugin, which was based of the example gallery included in the starter kit, and the error is gone. I’m not quite sure what I did wrong the first time, only difference is I cleaned up the indentation in the index.php file. For all I know it might as well have been a weird cache issue?

I’m still curious as to why it was shown in the panel though.