XF 2.2 Strange issue - errors - works fine in private area only issue with 1 thread and only 1 page

Schweddy

Member
  • ErrorException: Template error: [E_RECOVERABLE_ERROR] Method XF\PreEscaped::__toString() must return a string value
  • src/XF.php:1165
  • Generated by: Unknown account
  • Oct 1, 2021 at 11:20 PM

#0 src/XF.php(1165): XF\Template\Templater->handleTemplateError(4096, '[E_RECOVERABLE_...', '/home/XYZ/...', 1165, Array)
#1 src/XF/Template/Templater.php(1201): XF::escapeString(Object(XF\PreEscaped), 'html')
#2 internal_data/code_cache/templates/l1/s4/public/custom_fields_macros.php(81): XF\Template\Templater->escape(Object(XF\PreEscaped))
#3 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s4/public/message_macros.php(264): XF\Template\Templater->callMacro('custom_fields_m...', 'custom_fields_v...', Array, Array)
#5 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 internal_data/code_cache/templates/l1/s4/public/post_macros.php(29): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#7 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#9 internal_data/code_cache/templates/l1/s4/public/post_macros.php(147): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(987): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(923): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#12 internal_data/code_cache/templates/l1/s4/public/post_macros.php(179): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#13 src/XF/Template/Templater.php(824): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#14 internal_data/code_cache/templates/l1/s4/public/thread_view.php(835): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#15 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#17 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#18 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#19 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#20 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#21 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#22 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#23 src/XF.php(512): XF\App->run()
#24 index.php(20): XF::runApp('XF\\Pub\\App')
#25 {main}


array(4) {
["url"] => string(84) "/threads/w-383-cadets-in-training-americas-allies-and-enemies-prepare.339566/page-22"
["referrer"] => bool(false)
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

Version 2.2.7

Selection_049.png

Issue with 1 thread and only 1 page. We move the thread a private area and after awhile (guessing cache cleanup), page 22 works fine. Move thread back to public and we get Internal Server Error 500. My guess is some spider comes along and then it pops the error above 7 times.

All other pages in the thread work okay and without error.

At a loss. Any ideas?
 
Last edited:
Back
Top Bottom