Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

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

Started by Muut Archive 12 years ago · 17 replies · 540 views
12 years ago

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.

Is there something bad with nginx ?
Thanks.

12 years ago

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...

12 years ago

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

12 years ago

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

12 years ago

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.

12 years ago

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 <package>

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

12 years ago

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

BASH
bin/gpm version

if not the latest, you can update with:

BASH
bin/gpm selfupgrade
12 years ago

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

12 years ago

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.

12 years ago

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)

12 years ago

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!

12 years ago

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!

12 years ago

Ok Grav 0.9.10 released that should fix this problem.

12 years ago

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

12 years ago

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!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1297 9 years ago
Archive · by Muut Archive, 9 years ago
2 894 9 years ago
Archive · by Muut Archive, 9 years ago
2 4024 9 years ago
Archive · by Muut Archive, 9 years ago
1 2899 9 years ago
Archive · by Muut Archive, 9 years ago
3 1082 9 years ago