I am experiencing an odd issue on my single language Kirby installation where I’m trying to add the uniform plugin to my site. This happens:
without the plugin, the site works fine, both locally and on my live test url
took the most basic installation path: I download the uniform repo ZIP file, unpack it and place it in the site/plugins/uniform folder
locally this is fine, and the plugin works
when I visit the live URL, the page ‘breaks’, just shows up blank
My site’s code is here github.com > ldanielswakman/ldaniel-site/tree/v5; I’ve created 2 instances on the repository, one without the plugin folder and one with the plugin folder (see both links above). The plugin gets used in a snippet called contact.php, and in a route in the config file.
Tried to modify the .htaccess since both these URLs are in a subfolder, but that didn’t change anything. I also tried to add this folder to another Kirby site that didn’t use the plugin before and it also went blank. I also tried to checkout a code version of the plugin from a few months ago but it showed the same behaviour. I also checked if I’m required to instantiate the Form object in the controller, but in the Read The Docs AJAX example there is no use of the controller.
I’ve worked with the plugin before and had no issues, but this has ben bothering me all day and I can’t figure it out. Am I doing something very obviously wrong? Any help is greatly appreciated. Thanks!
Oh I forgot to mention that; there is also no error log. I mean, I checked both the /public_html home folder, the base subfolder of the two test instances ( /_/new and /_/new-uniformtest ) and some other folders. The only error I saw was a normal one, from when I removed the whole uniform folder but left the csrf helper in the code:
[06-Jun-2017 13:51:05 UTC] PHP Fatal error: Call to undefined function csrf_field() in /home/ldanielswakman/public_html/_/new/site/snippets/contact.php on line 77 (in the error_log file in the instance subfolder)
But this was a ‘normal’ error, the one that gets Kirby styling w debug on.
PHP version was set to 5.4; changed it to 5.6 and it worked. Try out the ‘get in touch button’ . The odd thing is that for Kirby the PHP requirement is 5.4, and Uniform doesn’t mention any specific (different) version. @mzur Is this something to look into further?
Anyway thanks both @texnixe and @mzur for help debugging!
@ldanielswakman Yes, many plugins require PHP 5.6, PHP versions below that are not recommended (end of lifetime reached) even if Kirby is still supporting them (won’t be the case in future versions, though).
Uniform supports PHP >=5.5. As PHP 5.4 reached end of life almost 2 years ago I didn’t find it worth mentioning. I’ll reconsider if this issue pops up more frequently.
(ProTip: If you install Uniform with Composer you get a warning for an unsupported PHP version ;-))
Right! I guess I never looked into PHP version at all since starting to use this hosting. I see your point, but since Kirby is listed to support PHP 5.4+, it would be good to mention it somewhere that Uniform is PHP 5.5+.
Haha and yeah I considered composer, but I like git submodules