Hi,
I am new tp Grav and I love it. I use nginx and php-fpm with the skeleton grav-skeleton-blog-site. All is great but when I click and the link at bottom of the page to go to the /page:2, all the post from the page make an error. I can see the Titles of posts, the begining content but when I click "continue reading’ I get this error :
Twig_Error_Runtime
An exception has been thrown during the rendering of a template (“Undefined index: /usr/share/nginx/html/grav-skeleton-blog-site/user/pages/01.blog/londo n-industry”) in “partials/blog_item.html.twig” at line 56.
This only occure on posts presented on the second page and perhaps, thrid one etc.
I edited the file user/themes/antimatter/templates/partials/blog_item.html.twig and placed {% set show_prev_next = false %} before {% if show_prev_next %} and the post is correctly displayed but without Previous and Next buttons. If this can help…
root@host:/usr/share/nginx/html/grav-skeleton-blog-site-test# bin/gpm index
PHP Warning: Module ‘apc’ already loaded in Unknown on line 0
PHP Warning: PHP Startup: apc.shm_size now uses M/G suffixes, please update your ini files in Unknown on line 0
Well thats’ very strange. The error your seeing appears to be related to something out of sync. I don’t really see how nginx would have problems with that specific plugin.
Usually an nginx problem would be related to pathing, url routing, that kind of thing. Not specific PHP errors inside a Twig template. Can you confirm what version of PHP is running inside your PHP-FPM setup?
I’m not really sure what else to suggest right now but i’m heading to bed. I’ll have a look tomorrow and see what could be causing that undefined index error.
Thanks for you help rhukster. Have a good night, here it’s a sunny morning Grav is a very great job.
root@host:/# php5-fpm -v
PHP 5.4.35-1~dotdeb.1 (fpm-fcgi) (built: Nov 17 2014 02:55:28)
I can recreate this! Just tried with a current 0.9.9 skeleton package and see the same thing even with Apache. So it’s a legitimate bug that seems to have snuck through.
Not sure why it works in my demo setup, but not the skeleton, but I will dig in and fix it. Thanks for bringing this up!
Actually I already know what it is. it’s something that I fixed after 0.9.9. I didn’t think it would cause a visible issue so didn’t release an update. However, i’ll make sure that update gets out this afternoon. Thanks!
multi-language support is on the roadmap for the near future. When we start working on that we will definitely be looking for people to help out with the translation effort. So thanks i’ll let you you know!