Best Answer

Search page returns 500 Internal Server error - v1.0.0 - Best Answer

Search page returns 500 Internal Server error - v1.0.0

by nou nou » Thu Apr 18, 2019 5:24 am

When doing a database search with the extension active, a 500 Internal Server Error is thrown on the search.php page.

This is from the server logs:

Code: Select all

[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: PHP Fatal error:  Uncaught Twig_Error_Syntax: Unexpected character "$". in /home/[user]/[webdirectory]/ext/kinerity/bestanswer/styles/prosilver/template/event/search_results_topic_title_after.html:2, referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: Stack trace:, referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: #0 /home/[user]/[webdirectory]/vendor/twig/twig/lib/Twig/Lexer.php(216): Twig_Lexer->lexExpression(), referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: #1 /home/[user]/[webdirectory]/vendor/twig/twig/lib/Twig/Lexer.php(122): Twig_Lexer->lexBlock(), referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: #2 /home/[user]/[webdirectory]/phpbb/template/twig/lexer.php(137): Twig_Lexer->tokenize(Object(Twig_Source)), referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: #3 /home/[user]/[webdirectory]/cache/production/container_4335734bbdd20f586549a504dff5f80c.php(6125): phpbb\\template\\twig\\lexer->tokenize('{% if searchres...', '@kinerity_besta...'), referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: #4 /home/[user]/[webdirectory]/vendor/twig/twig/lib/Twig/Environment.php(677): phpbbtemplatetwiglexer_000000002286083e0000000033f87060->tokenize(Object(Twig_Source)), referer: https://www.[webdirectory]/index.php
[Wed Apr 17 18:05:27 2019] [warn] [client 23.16.30.83] mod_fcgid: stderr: #5 /home/[user]/[webdirectory]/vendor/twig/twig/lib/Twig/Environment.php(774): Twig_Envi in /home/[user]/[webdirectory]/ext/kinerity/bestanswer/styles/prosilver/template/event/search_results_topic_title_after.html on line 2, referer: https://www.[webdirectory]/index.php
This only happens when a search returns a (any) result. Searches with 0 results return the normal page (with 0 results).

Whether any post is marked as Best Answer has no influence - clearing the database data doesn't help.

Disabling the extension fixes the issue.

phpBB 3.2.5
PHP 7.1 and 7.2
User avatar
nou nou
Registered User
Posts: 725
Joined: Sat Oct 29, 2016 8:08 pm

Re: Search page returns 500 Internal Server error - v1.0.0

by Kailey » Thu Apr 18, 2019 2:28 pm

Kailey Snay - Community Team Leader
Knowledge Base | Documentation | Community rules
If you have any questions about the rules/customs of this website, feel free to send me a PM.

My little corner of the world | Administrator @ phpBB Modders
User avatar
Kailey
Community Team Leader
Community Team Leader
Posts: 3999
Joined: Mon Sep 01, 2014 1:00 am
Location: sudo rm -rf /
Name: Kailey Snay

Re: Search page returns 500 Internal Server error - v1.0.0

by nou nou » Thu Apr 18, 2019 6:16 pm

Well that was easy - thank you! :)
User avatar
nou nou
Registered User
Posts: 725
Joined: Sat Oct 29, 2016 8:08 pm