Weird SimpleSearch errors

When I use simplesearch it seems to break only on certain queries.
Certain queries seem to work. Weird. I’ve converted around 120 articles to markdown. I think the problem might be there somewhere.
Any help is appreciated! :slight_smile:

In the front I get

Server Error
Sorry, something went terribly wrong!
0 - An exception has been thrown during the rendering of a template (“Invalid argument supplied for foreach()”) in “simplesearch_results.html.twig” at line 12.

Here are some logs.

[2016-01-16 12:51:16] grav.CRITICAL: An exception has been thrown during the rendering of a template ("Invalid argument supplied for foreach()") in "simplesearch_results.html.twig" at line 12. - Trace: #0 /srv/grav/grav/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code(264): Twig_Template->displayBlock('content', Array, Array) #1 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(167): __TwigTemplate_c836da3e0517d8ed8f2b57c416af7600b31b0cc825c6c7f11ad7a0f 7e43c687c->block_body(Array, Array) #2 /srv/grav/grav/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code(61): Twi g_Template->displayBlock('body', Array, Array) #3 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(381): __TwigTemplate_c836da3e0517d8ed8f2b57c416af7600b31b0cc825c6c7f11ad7a0f 7e43c687c->doDisplay(Array, Array) #4 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(355): Twig_Template->displayWithErrorHandling(Array, Array) #5 /srv/grav/grav/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code(23): Twig_Template->display(Array, Array) #6 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(381): __TwigTemplate_6bcc11cfe422482022643ff9732e774964226d0986db4e4ac7def96 b9f4a8d72->doDisplay(Array, Array) #7 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(355): Twig_Template->displayWithErrorHandling(Array, Array) #8 /srv/grav/grav/vendor/twig/twig/lib/Twig/Environment.php(403) : eval()'d code(24): Twig_Template->display(Array, Array) #9 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(381): __TwigTemplate_038597e82a76b9ea33df4d03121ecad9cd42ef7f75af53588d363a2 b0fb0b78b->doDisplay(Array, Array) #10 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(355): Twig_Template->displayWithErrorHandling(Array, Array) #11 /srv/grav/grav/vendor/twig/twig/lib/Twig/Template.php(366): Twig_Template->display(Array) #12 /srv/grav/grav/vendor/twig/twig/lib/Twig/Environment.php(347): Twig_Template->render(Array) #13 /srv/grav/grav/system/src/Grav/Common/Twig/Twig.php(325): Twig_Environment->render('simplesearch_re...', Array) #14 /srv/grav/grav/system/src/Grav/Common/Grav.php(155): Grav\Common\Twig\Twig->processSite(NULL) #15 /srv/grav/grav/vendor/pimple/pimple/src/Pimple/Container.php(113): Grav\Common\Grav::Grav\Common\{closure}(Object(Grav\Common\Grav)) #16 /srv/grav/grav/system/src/Grav/Common/Grav.php(253): Pimple\Container->offsetGet('output') #17 /srv/grav/grav/index.php(38): Grav\Common\Grav->process() #18 {main} [] []
---

It’s a bit complicated to recreate the exact problem without the right set of pages and config. Do you mind zipping your user/ folder and sending it to me over a Gitter PM? Also, which queries give an error and which do not?

I’ll send you the ZIP ASAP. :slight_smile: Much appreciated - you having the time to go over my n00b stuff. :slight_smile:

I’m taking a wild guess here but I think it could be due to some markdown conversion and special chars from an UTF8 Wordpress database.

Thanks!

Hmmm I “fixed” the “issue” by re-enabling translations. Now search works. Thanks anyway, I won’t be bothering you with my stuff. :slight_smile:

This is hilarious.