- Affected version
- 2.2.15
Got this error from a thread without a poll. When I went to change thread type, it shown as currently a poll. After changing to discussion type, the error still persists.
Server error log
TypeError: Extension public:thread_view :: structured_data() error: XF\ThreadType\AbstractHandler::isPostVotingSupported(): Argument #2 ($post) must be of type XF\Entity\Post, null given, called in /home/nginx/domains/x.com/public/src/XF/ThreadType/AbstractHandler.php on line 321
src/XF/ThreadType/AbstractHandler.php:506
Generated by:
1/31/24 at 6:24 PM
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/ThreadType/AbstractHandler.php(321): XF\ThreadType\AbstractHandler->isPostVotingSupported(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), NULL)
#1 src/XF/Entity/Thread.php(929): XF\ThreadType\AbstractHandler->getLdStructuredData(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#2 src/XF/Template/Templater.php(1195): XF\Entity\Thread->getLdStructuredData(Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#3 internal_data/code_cache/templates/l1/s33/public/thread_view.php(13): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'getLdStructured...', Array)
#4 src/XF/Template/Templater.php(991): XF\Template\Templater->{closure}(Object(OzzModz\VerificationBadges\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#5 src/XF/Template/Templater.php(927): XF\Template\Templater->renderExtensionInternal('structured_data', Array, Array, Object(XF\Template\ExtensionSet))
#6 internal_data/code_cache/templates/l1/s33/public/thread_view.php(640): XF\Template\Templater->renderExtension('structured_data', Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(OzzModz\VerificationBadges\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#9 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#11 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#15 src/XF.php(524): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
[LIST]
[*]ErrorException: Template error: [E_WARNING] Attempt to read property "message" on null
[*]src/XF/ThreadType/AbstractHandler.php:314
[*]Generated by
[*]1/31/24 at 6:29 PM
[/LIST]
[HEADING=2]Stack trace[/HEADING]
#0 src/XF/ThreadType/AbstractHandler.php(314): XF\Template\Templater->handleTemplateError(2, '[E_WARNING] Att...', '/home/nginx/dom...', 314)
#1 src/XF/Entity/Thread.php(929): XF\ThreadType\AbstractHandler->getLdStructuredData(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#2 src/XF/Template/Templater.php(1195): XF\Entity\Thread->getLdStructuredData(Object(TickTackk\ChangeContentOwner\XF\Entity\Post), 1, Array)
#3 internal_data/code_cache/templates/l1/s33/public/thread_view.php(13): XF\Template\Templater->method(Object(TickTackk\ChangeContentOwner\XF\Entity\Thread), 'getLdStructured...', Array)
#4 src/XF/Template/Templater.php(991): XF\Template\Templater->{closure}(Object(OzzModz\VerificationBadges\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#5 src/XF/Template/Templater.php(927): XF\Template\Templater->renderExtensionInternal('structured_data', Array, Array, Object(XF\Template\ExtensionSet))
#6 internal_data/code_cache/templates/l1/s33/public/thread_view.php(640): XF\Template\Templater->renderExtension('structured_data', Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(OzzModz\VerificationBadges\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#9 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#11 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#15 src/XF.php(524): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}