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
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 .htaccess.
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 ..../clients/clemenspurner/site/templates/home.php
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?
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.
<br />
<b>Fatal error</b>: Uncaught Error: Call to undefined function snippet() in /homepages/5/d395522442/htdocs/DennisAdelmann/clients/clemenspurner/home.php:1
Stack trace:
#0 {main}
thrown in <b>/homepages/5/d395522442/htdocs/DennisAdelmann/clients/clemenspurner/home.php</b> on line <b>1</b><br />
I only get this error when using the back button. But the path is really strange. Is there a file that shouldn’t be there? Or is the javascript calling a wrong path?
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
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.
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.
But the error also occurs if javascript is deactivated; in fact, there’s nothing much to see if Javascript is off which is not a good thing actually, as JS should only be used for progressive enhancement.
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.