Fixed TypeError: Macro public:post_article_macros :: article_preview() error

Affected version
2.2.1

loulou

Member
Code:
#0 [internal function]: XF\Entity\Thread->getLdStructuredData(NULL)
#1 src/XF/Template/Templater.php(1166): call_user_func_array(Array, Array)
#2 /data/tsat/data/internal_data/internal_data/code_cache/templates/l4/s18/public/post_article_macros.php(476): XF\Template\Templater->method(Object(XFES\XF\Entity\Thread), 'getLdStructured...', Array)
#3 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#4 /data/tsat/data/internal_data/internal_data/code_cache/templates/l4/s18/public/forum_view_type_article.php(153): XF\Template\Templater->callMacro('post_article_ma...', 'article_preview', Array, Array)
#5 src/XF/Template/Templater.php(799): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#6 /data/tsat/data/internal_data/internal_data/code_cache/templates/l4/s18/public/forum_view_type_article.php(54): XF\Template\Templater->callMacro('forum_view_type...', 'article_helper', Array, Array)
#7 src/XF/Template/Templater.php(962): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(898): XF\Template\Templater->renderExtensionInternal('thread_list', Array, Array, Object(XF\Template\ExtensionSet))
#9 /data/tsat/data/internal_data/internal_data/code_cache/templates/l4/s18/public/forum_view.php(583): XF\Template\Templater->renderExtension('thread_list', Array, Object(XF\Template\ExtensionSet))
#10 src/XF/Template/Templater.php(1609): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(1600): XF\Template\Templater->renderTemplate('forum_view', Array, true, Object(XF\Template\ExtensionSet))
#12 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_view_type...', Array)
#13 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#14 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Forum\\ViewTy...', 'public:forum_vi...', Array)
#15 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#16 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#17 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#18 src/XF/App.php(2300): XF\Mvc\Dispatcher->run()
#19 src/XF.php(465): XF\App->run()
#20 index.php(20): XF::runApp('XF\\Pub\\App')
#21 {main}

This is somehow related to guest pagecache for article only forums.
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.2).

Change log:
Prevent an error when rendering article previews if the thread's first post is not set correctly
There may be a delay before changes are rolled out to the XenForo Community.
 
Top