I am about to finishing a project. Everything works fine locally. But when I upload the project to test it on my server, I got this message for the project subpages. Homepage + about page are working without any problems.
Fatal error: Call to undefined function snippet() in /homepages/5/d395522442/htdocs/dennis/clients/clemenspurner/home.php on line
Usual checks apply:
- Is your server running the correct version of PHP
- Is your server up to date
- Is your server running Centos 6 or 7 (I have run into case sensitivity issues that dont show up on Ubuntu)
- Did your files transfer successfully (Recommend using SFTP or Rsync for this).
- Do the files have the correct persmissions on the server
- By the path in your error, it looks as though this site is in a subfolder. Try enabling
RewriteBase /path/from/webroot/to/site/subfolder which will reset what the server thinks is the root of the server. This is done in
- Did you some how forget to transfer the Kirby folder to the server
That error looks a bit funny
..../clients/clemenspurner/home.php have you modified Kirby at all to rearrange the default folders? I would expect that path to be more like
Was the upload process successful? Make sure that all your files were really uploaded completely and without any errors. It is a bit surprising that the home template throws an error when the home page as such is working properly?
Thank for the answers. I’ve already uploaded the project several times. Also the Path to the subfolder is right.
I have no clue whats going on.
Do you have debugging enabled on the site? I cant see any errors, except when i go into say the Volkswagon project, its just black with a title.
edit: i can see the error now, did a view source. An odd one.
<b>Fatal error</b>: Uncaught Error: Call to undefined function snippet() in /homepages/5/d395522442/htdocs/DennisAdelmann/clients/clemenspurner/home.php:1
thrown in <b>/homepages/5/d395522442/htdocs/DennisAdelmann/clients/clemenspurner/home.php</b> on line <b>1</b><br />
Same here… Can’t see any PHP errors either.
yes debugging is enabled.
when you click on a project, the project isnt loading and when you try loading the url of the project it sending me the error message
do you really have a
home.php file in the root of the project? Should only have
Maybe due to the JS errors.
yes, home.php is there. I set it as home like this c::set(‘home’, ‘home’);
You have a home.php outside the template folder? The
c::set('home') directive is only useful & necessary if you want to make another folder than the home folder your home folder, which you haven’t done.
Are you using the correct version of jquery?
Uncaught TypeError: Cannot read property 'on' of undefined
at HTMLDivElement.<anonymous> (app.js:97)
at HTMLDivElement.d.complete (jquery.min.js:3)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at i (jquery.min.js:3)
at Function.r.fx.tick (jquery.min.js:3)
at eb (jquery.min.js:3)
Ive got a hunch i ran into an issue with
on becuase it was deprecated (i think). Try using the last version of jquery 1 or 2 rather then three. Its a wild guess.
just changed the version to 2.2.4… but nothing changed
maybe it has something to do with the ajax request?
But the about page is loading without any problems …
Oh, okay. That’s beyond my knowledge. What’s the best way to solve it? Because it is not understandable to me as a beginner why it runs locally but not on my server.
Well, I still don’t know where this home.php file comes from? Where exactly is that located?
The home.php is inside of my templates folder
OH ……… There was another home.php file outside of the template folder. Thanks everyone for helping me… a silly mistake