Of course! I hate Camel Case. normally I would not do that in a filename. Kirby builder made me do it.
Thanks God, I wouldn’t have thought we would come across this file naming issue again after we had this so many times in the past that I even added a warning in the Getting Started guide.
Why would it not respect this blueprint setting, which is not in camelCase when telling it which snippet to use? Is that a Kirby Builder bug /quirk?
builder: label: Show and Tell type: builder fieldsets: singleImage: label: Single Image snippet: builder/singleimage
Because the field is called
singleImage. That would explain why the snippet in the Panel worked.
I see … would seem CentOS is more picky about case sensitivity than Ubuntu then. That surprises me - always thought *nix systems are very strict on that, regardless of distribution.
Me too, if you had said it worked on a Windows box but not on live server, I would have jumped to conclusions right away, but Ubuntu and CentOS?
Precisely! Windows is very sloppy in that regard and would have been my first culprit as well.
Hi guys, most probably this is a no brainer somehow but I’m running out of ideas here at the moment…
Page is running great on Kirby 2.5.5 (PHP Version 5.6.31) on my local machine (Mac), only one snippet is not showing the variables when deployed to the internet web server (uberspace running PHP Version 5.6.31). I handle the source data with git, so there all deployed files should be up to date…
Code is as follows:
<h3>Haftungsauschluss</h3> <?php a::show($haftung) ?> Test1: <? echo "Ausgabe: " . $haftung ?> <h3>Datenschutz</h3> <?php a::show($datenschutz) ?> Test2: <? echo "Ausgabe: " . $datenschutz ?>
Any ideas how to debug this or where to check for errors?
Use proper echo short tags, instead of php short tags:
Test2: <?= "Ausgabe: " . $datenschutz ?>
(PHP Short tags
<? ?> are likely not enabled and shouldn’t be used for compatibility and other reasons.)
Working like a charm, thanks a lot!
Please update documentation accordingly: https://getkirby.com/docs/templates/snippets
@ollebolle Where exactly did you find such a php shortag used? Or do you mean replace
<?php echo with
<?=? (We will do the latter for Kirby 3)
@texnixe: this is what I meant, please replace the example
I followed the documentation and ended up with this issue…
Thanks a lot for you quick reply!
There’s nothing wrong with using
<?php echo $datenschutz ?> Your problem was this:
<? echo "Ausgabe: " . $datenschutz ?>
<? ?> this is called a PHP short tag = not recommended
<?= ?> this is a PHP short echo tag = recommended, but using
<?php echo ?> is no problem
Ok - now I’ve got it… Thanks…