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 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!
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?