Troubles with grav-skeleton-blog-site on second page blog

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 :

An exception has been thrown during the rendering of a template (“Undefined index: /usr/share/nginx/html/grav-skeleton-blog-site/user/pages/ 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.

Is there something bad with nginx ?

This is a fresh install.

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…

Do other links on the page work? i.e. Tags, Random button, Related Posts, etc? Is it only pagination that has trouble?

All the others links on the second page work very well. It seems to be only the pagination. Sorry for my bad english.

are you all up to date with plugins and themes? do a bin/gpm index to get a status of if whether or not there are updates available.

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

Plugins [ 26 ]

  1. Anchors [ anchors ] [v1.1.0] (not installed)
  2. Archives [ archives ] [v1.1.0] (installed)
  3. Assets [ assets ] [v1.0.2] (not installed)
  4. Breadcrumbs [ breadcrumbs ] [v1.2.0] (installed)
  5. Error [ error ] [v1.2.1] (installed)
  6. Feed [ feed ] [v1.3.0] (installed)
  7. Highlight [ highlight ] [v1.1.0] (not installed)
  8. JSComments [ jscomments ] [v1.1.0] (not installed)
  9. Pagination [ pagination ] [v1.2.1] (installed)
  10. Random [ random ] [v1.2.0] (installed)
  11. Reading Time [ readingtime ] [v1.0.6] (not installed)
  12. Sitemap [ sitemap ] [v1.2.0] (installed)
  13. SimpleSearch [ simplesearch ] [v1.2.1] (installed)
  14. Smartypants [ smartypants ] [v2.0.1] (not installed)
  15. Taxonomy List [ taxonomylist ] [v1.2.0] (installed)
  16. GitHub [ github ] [v1.1.0] (not installed)
  17. Twig Cache [ twigcache ] [v1.2.0] (not installed)
  18. Snipcart [ snipcart ] [v1.2.0] (not installed)
  19. LightSlider [ lightslider ] [v1.2.2] (not installed)
  20. Problems [ problems ] [v1.1.3] (installed)
  21. VideoEmbed [ videoembed ] [v1.4.0] (not installed)
  22. Simple Contact [ simplecontact ] [v1.0.1] (not installed)
  23. Featherlight [ featherlight ] [v1.0.2] (not installed)
  24. Read Later [ readlater ] [v1.0.2] (not installed)
  25. Staticfilecache [staticfilecache] [v1.0.0] (not installed)
  26. RelatedPages [ relatedpages ] [v1.0.3] (installed)

Themes [ 5 ]

  1. Afterburner2 [ afterburner2 ] [v1.1.3] (not installed)
  2. Antimatter [ antimatter ] [v1.2.3] (installed)
  3. Bootstrap [ bootstrap ] [v1.1.3] (not installed)
  4. HPSTR [ hpstr ] [v1.0.1] (not installed)
  5. Mediator [ mediator ] [v1.0.1] (not installed)

You can either get more informations about a package by typing:
bin/gpm info

Or you can install a package by typing:
bin/gpm install

what about the current Grav version? Are you running 0.9.9 ?

bin/gpm version

if not the latest, you can update with:

bin/gpm selfupgrade

This is the latest : You are running Grav v0.9.9

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 :slight_smile: 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!

BTW, until it’s released you can grab the lastest Page.php from GitHub, this is the fix I made 4 days ago that should resolve the issue:

Ok Grav 0.9.10 released that should fix this problem.

Wow that’s great ! Thank you very much.

If you need someone for translate into French I can help.

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!