• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 2.0 Server error log: Accessed unknown getter

ALMUSA

Active member
#1
I'm continuously getting more than 2300 errors same this below. Not sure what is causing it.

  • InvalidArgumentException: Accessed unknown getter 'customFields' on XF:User[10]
  • src/XF/Mvc/Entity/Entity.php:179

#0 src/XF/Mvc/Entity/Entity.php(97): XF\Mvc\Entity\Entity->get('customFields')
#1 internal_data/code_cache/templates/l1/s7/public/message_macros.php(109): XF\Mvc\Entity\Entity->offsetGet('customFields')
#2 src/XF/Template/Templater.php(571): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#3 internal_data/code_cache/templates/l1/s7/public/post_macros.php(39): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#4 src/XF/Template/Templater.php(571): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#5 internal_data/code_cache/templates/l1/s7/public/thread_view.php(520): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#6 src/XF/Template/Templater.php(1133): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#7 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#8 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#10 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(1831): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}


#0 src/XF/Mvc/Entity/Entity.php(97): XF\Mvc\Entity\Entity->get('customFields')
#1 internal_data/code_cache/templates/l1/s7/public/message_macros.php(101): XF\Mvc\Entity\Entity->offsetGet('customFields')
#2 src/XF/Template/Templater.php(571): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#3 internal_data/code_cache/templates/l1/s7/public/post_macros.php(39): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#4 src/XF/Template/Templater.php(571): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array, Array)
#5 internal_data/code_cache/templates/l1/s7/public/thread_view.php(520): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#6 src/XF/Template/Templater.php(1133): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#7 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('public:thread_v...', Array)
#8 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#9 src/XF/Mvc/Dispatcher.php(332): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#10 src/XF/Mvc/Dispatcher.php(303): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#11 src/XF/Mvc/Dispatcher.php(44): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#12 src/XF/App.php(1831): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}


and many more like the above.
 

Chris D

XenForo developer
Staff member
#2
Which Beta version are you running? Can you reproduce the issue on a completely unedited style?

The problematic code doesn't appear to be in the master template so it's either a customisation or an older version.
 

ALMUSA

Active member
#3
Im running Beta 5. I believe xf 2 seems not to be accepting {$user.customFields.customFieldsID} which I have replaced to {$extra.customFields.customFieldsID} and I since then I have not reproduce the error.
 

Chris D

XenForo developer
Staff member
#4
You're using the XF1 way of accessing custom fields in the template, that's what was causing the problem.

What are you trying to do, exactly? As with XF1 you can already display custom fields in the message user info area just with a toggle in style properties and the custom field itself.