Panel not loading Blueprints

Hi There,

I recently made some changes to a Kirby site and uploaded them to my server. On the front end, everything looks good, but on the back end, the site is still loading the old blueprints. Is there a Panel cache that I need to clear? What am I missing here?

It actually looks like the Panel is loading the Default blueprint for two of my pages. Iโ€™m not sure why. The two pages that are getting the default blueprint are pages that have a title field and an info field. For some reason my web server doesnโ€™t load the proper blueprint for this page in the Panel and loads the default blueprint instead.

Everything works as expected on my local machine, just not on my server.

I have two ideas:

  1. Are the files on your server exactly the same as on your localhost? It happened to me once that there were old image meta files on the server for a language I had deactivated - that caused the default blueprint to load, no idea why.
  2. Are the permissions set correctly on the server, i.e. can it read the blueprint file?

I found a solution. I was using camel case to name my files. e.g., teamMember.php. On my localhost this worked fine, but the web server couldnโ€™t find those files. Any idea why?

@FabianSperrle, thanks for the tips.

Oh, you know what, my missing blueprints are named in the same style. Did it work when you renamed them without camel case @ScottKbka?

@joslemmons. Yep, everything works perfect now! :smile:

1 Like

I thought it was spelling in the first place, but just to confirm, was it a mismatch between text file and blueprint (e.g. teammember.txt and teamMember.php) or the camel case as such?

@texnixe There was no spelling mismatch. I was using teamMember.txt and teamMember.php. On the font end, everything worked fine. But the pannel could not find blueprints/teamMember.php. I reverted everything to lowercase, i.e., member.txt and member.php and now it works fine.

Does this have something to do with how the Panel reads the blueprint YAML? I noticed that fields named firstName, for example can be accessed using $page->firstname()

Oh, I see, thanks for your feedback. From looking at the source code, it seems that the panel is looking for a lowercase blueprint file, so that means that all text files should be lowercase indeed.

This is the find() function from blueprint.php:

static public function find($id) {

    if(is_a($id, 'Page')) {

      $name = $id->intendedTemplate();
      $file = static::$root . DS . strtolower($name) . '.php';

      if(!file_exists($file)) {
        $name = $id->template();
        $file = static::$root . DS . strtolower($name) . '.php';

        if(!file_exists($file)) {
          $name = 'default';
        }

      }
...

Ah, thanks. I was just digging through the panel to see if I could find that.

ahh, I just replied to the other thread and then saw this one. So is this completely fixing the issue for you?

Yep, this fixed it for me. Thanks, @bastianallgeier .

Why does the panel downcase the file names?