XF 2.2 suddenly getting: Accessed unknown getter 'prefix_id' on XF:ConversationMaster[29] whenever someone starts or replies to a conversation?!

zoldos

Well-known member
I disabled all my mods that involve conversations, as well as a few others (including Zodiac signs, shown below). But I keep getting this, and slightly varied server errors (depending on which mod is disabled) whenever a member starts or replies to a conversation. Very strange! I'm stumped. Can anyone help? Thanks!

Here is the exact error:

InvalidArgumentException: Accessed unknown getter 'prefix_id' on XF:ConversationMaster[28] src/XF/Mvc/Entity/Entity.php:213

Generated by: Draconis Morbidius May 12, 2023 at 1:59 PM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('prefix_id')
#1 src/XF/Template/Templater.php(3517): XF\Mvc\Entity\Entity->__get('prefix_id')
#2 src/XF/Template/Templater.php(1129): XF\Template\Templater->fnPrefix(Object(X0815\ZodiacSigns\XF\Template\Templater), true, 'thread', Object(SV\ConversationImprovements\XF\Entity\ConversationMaster))
#3 internal_data/code_cache/templates/l1/s2/public/conversation_view.php(47): XF\Template\Templater->func('prefix', Array, true)
#4 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(X0815\ZodiacSigns\XF\Template\Templater), Array, NULL)
#5 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('conversation_vi...', Array)
#6 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#7 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Conversation...', 'public:conversa...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Request state

array(4) {
["url"] => string(18) "/conversations/28/"
["referrer"] => string(25) "https://bloodofsouls.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Looks like it could be related to a third party add-on - ZodiacSigns.
I thought that, too. So I disabled that mod, and now I get:

Generated by: Draconis Morbidius May 12, 2023 at 2:45 PM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('prefix_id')
#1 src/XF/Template/Templater.php(3517): XF\Mvc\Entity\Entity->__get('prefix_id')
#2 src/XF/Template/Templater.php(1129): XF\Template\Templater->fnPrefix(Object(XF\Template\Templater), true, 'thread', Object(XF\Entity\ConversationMaster))
#3 internal_data/code_cache/templates/l1/s2/public/conversation_view.php(34): XF\Template\Templater->func('prefix', Array, true)
#4 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#5 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('conversation_vi...', Array)
#6 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#7 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Conversation...', 'public:conversa...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Request state

array(4) {
["url"] => string(18) "/conversations/28/"
["referrer"] => string(25) "https://bloodofsouls.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

:(
 
A customisation you have made/installed is to blame.
It could be an add-on, style, modified template, custom nav tab, widget, etc.

Try disabling all add-ons and rebuilding the master data.
If the problem is resolved, enable add-ons one at a time until it returns.
 
There's no issue with running an older version, as long as any third party styles and add-ons are compatible with said version.

And I can't believe I still have to post this, considering how many times it has been asked, but no, rebuilding master data does not affect your modified templates or phrases.
 
Errr.... it's pretty much standard if you want to use a newer version of XF, you need to use a compatible version of the style. If you can't do both, then don't do either. It's the very nature of the beast.
 
There's no issue with running an older version, as long as any third party styles and add-ons are compatible with said version.

And I can't believe I still have to post this, considering how many times it has been asked, but no, rebuilding master data does not affect your modified templates or phrases.
Okay, thanks! All plugins are disabled, and I'm still getting the error. I will try a master rebuild.
 
Master rebuild complete, all plugins disabled. I get:

InvalidArgumentException: Accessed unknown getter 'prefix_id' on XF:ConversationMaster[30] src/XF/Mvc/Entity/Entity.php:213

Generated by: Draconis Morbidius May 12, 2023 at 6:42 PM

Stack trace

#0 src/XF/Mvc/Entity/Entity.php(119): XF\Mvc\Entity\Entity->get('prefix_id')
#1 src/XF/Template/Templater.php(3517): XF\Mvc\Entity\Entity->__get('prefix_id')
#2 src/XF/Template/Templater.php(1129): XF\Template\Templater->fnPrefix(Object(XF\Template\Templater), true, 'thread', Object(XF\Entity\ConversationMaster))
#3 internal_data/code_cache/templates/l1/s2/public/conversation_view.php(34): XF\Template\Templater->func('prefix', Array, true)
#4 src/XF/Template/Templater.php(1652): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, NULL)
#5 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('conversation_vi...', Array)
#6 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#7 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Conversation...', 'public:conversa...', Array)
#8 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#9 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#10 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#11 src/XF/App.php(2483): XF\Mvc\Dispatcher->run()
#12 src/XF.php(524): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}

Request state

array(4) {
["url"] => string(18) "/conversations/30/"
["referrer"] => string(32) "https://bloodofsouls.com/online/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}

*Update: Now getting the error when just viewing a conversation (before, it was only when sending one)!
 
It doesn't. Template issue then. I don't recall making any template mods that would cause errors. Things were fine for a month, then bam, server errors.

I did change a few things in the conversation template. I'll take a peak at it.

Thanks!!!
 
Back
Top Bottom