What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Bug TypeError: Template public:widget_forum_statistics error: unserialize(): Argument #1 ($data) must be of type string, array given

madness85

Member
Php 8 issue. Widget, forum statistics stops displaying in forum list sidebar and gives this error every page load


  • TypeError: Template public:widget_forum_statistics error: unserialize(): Argument #1 ($data) must be of type string, array given
  • src/XF/Mvc/Entity/ValueFormatter.php:22
Code:
#0 src/XF/Mvc/Entity/ValueFormatter.php(22): unserialize(Array)
#1 src/XF/Mvc/Entity/ValueFormatter.php(64): XF\Mvc\Entity\ValueFormatter->decodeValueFromSource(65544, Array)
#2 src/XF/Mvc/Entity/Manager.php(794): XF\Mvc\Entity\ValueFormatter->decodeValueFromSourceExtended(65544, Array, Array)
#3 src/XF/Mvc/Entity/Entity.php(237): XF\Mvc\Entity\Manager->decodeValueFromSourceExtended(65544, Array, Array)
#4 src/XF/Mvc/Entity/Entity.php(183): XF\Mvc\Entity\Entity->getValue('xfa_cui_params')
#5 src/addons/XFA/CustomUsernameIcons/XF/Entity/User.php(18): XF\Mvc\Entity\Entity->get('xfa_cui_params')
#6 src/XF/Mvc/Entity/Entity.php(112): XFA\CustomUsernameIcons\XF\Entity\User->get('xfa_cui_params')
#7 src/addons/XFA/CustomUsernameIcons/XF/Template/Templater.php(43): XF\Mvc\Entity\Entity->__get('xfa_cui_params')
#8 src/XF/Template/Templater.php(1128): XFA\CustomUsernameIcons\XF\Template\Templater->fnUsernameLink(Object(SV\StandardLib\XF\Template\Templater), false, Object(MMO\Hide\XF\Entity\User), false, Array)
#9 internal_data/code_cache/templates/l1/s32/public/widget_forum_statistics.php(28): XF\Template\Templater->func('username_link', Array)
#10 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#11 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('widget_forum_st...', Array)
#12 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#13 src/XF/Template/Templater.php(1928): XF\Widget\WidgetRenderer->__toString()
#14 internal_data/code_cache/templates/l1/s32/public/forum_list.php(219): XF\Template\Templater->widgetPosition('forum_list_side...', Array)
#15 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#16 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', 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:Forum\\Listin...', 'public:forum_li...', 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(2351): XF\Mvc\Dispatcher->run()
#23 src/XF.php(517): XF\App->run()
#24 index.php(20): XF::runApp('XF\\Pub\\App')
#25 {main}
Request state
array(4) {
  ["url"] => string(1) "/"
  ["referrer"] => string(22) "https://forum.me/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

madness85

Member
  • TypeError: Template public:widget_forum_statistics error: json_decode(): Argument #1 ($json) must be of type string, array given
  • src/XF/Mvc/Entity/ValueFormatter.php:33
Code:
#0 src/XF/Mvc/Entity/ValueFormatter.php(33): json_decode(Array, true)
#1 src/XF/Mvc/Entity/ValueFormatter.php(64): XF\Mvc\Entity\ValueFormatter->decodeValueFromSource(65552, Array)
#2 src/XF/Mvc/Entity/Manager.php(794): XF\Mvc\Entity\ValueFormatter->decodeValueFromSourceExtended(65552, Array, Array)
#3 src/XF/Mvc/Entity/Entity.php(237): XF\Mvc\Entity\Manager->decodeValueFromSourceExtended(65552, Array, Array)
#4 src/XF/Mvc/Entity/Entity.php(183): XF\Mvc\Entity\Entity->getValue('dbtech_shop_pur...')
#5 src/addons/XFA/CustomUsernameIcons/XF/Entity/User.php(18): XF\Mvc\Entity\Entity->get('dbtech_shop_pur...')
#6 src/XF/Mvc/Entity/Entity.php(112): XFA\CustomUsernameIcons\XF\Entity\User->get('dbtech_shop_pur...')
#7 src/addons/DBTech/Shop/XF/Entity/User.php(219): XF\Mvc\Entity\Entity->__get('dbtech_shop_pur...')
#8 src/XF/Mvc/Entity/Entity.php(160): DBTech\Shop\XF\Entity\User->getDbtechShopPurchase()
#9 src/addons/XFA/CustomUsernameIcons/XF/Entity/User.php(18): XF\Mvc\Entity\Entity->get('dbtech_shop_pur...')
#10 src/XF/Mvc/Entity/Entity.php(112): XFA\CustomUsernameIcons\XF\Entity\User->get('dbtech_shop_pur...')
#11 src/addons/DBTech/Shop/Repository/Purchase.php(296): XF\Mvc\Entity\Entity->__get('dbtech_shop_pur...')
#12 src/addons/DBTech/Shop/Repository/Purchase.php(331): DBTech\Shop\Repository\Purchase->getViewablePurchasesForUser(Object(MMO\Hide\XF\Entity\User), false)
#13 src/addons/DBTech/Shop/XF/Entity/User.php(286): DBTech\Shop\Repository\Purchase->filterActivePurchasesForUser(Object(MMO\Hide\XF\Entity\User), false)
#14 src/addons/XFA/CustomUsernameIcons/XF/Entity/User.php(38): DBTech\Shop\XF\Entity\User->hasPermission('xfa_cui', 'selectCustomIco...')
#15 src/addons/XFA/CustomUsernameIcons/XF/Template/Templater.php(87): XFA\CustomUsernameIcons\XF\Entity\User->canXfaSelectCustomUsernameIcon()
#16 src/XF/Template/Templater.php(1128): XFA\CustomUsernameIcons\XF\Template\Templater->fnUsernameLink(Object(SV\StandardLib\XF\Template\Templater), false, Object(MMO\Hide\XF\Entity\User), false, Array)
#17 internal_data/code_cache/templates/l1/s34/public/widget_forum_statistics.php(28): XF\Template\Templater->func('username_link', Array)
#18 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#19 src/XF/Widget/WidgetRenderer.php(62): XF\Template\Templater->renderTemplate('widget_forum_st...', Array)
#20 src/XF/Widget/WidgetRenderer.php(67): XF\Widget\WidgetRenderer->render()
#21 src/XF/Template/Templater.php(1928): XF\Widget\WidgetRenderer->__toString()
#22 internal_data/code_cache/templates/l1/s34/public/forum_list.php(219): XF\Template\Templater->widgetPosition('forum_list_side...', Array)
#23 src/XF/Template/Templater.php(1651): XF\Template\Templater->{closure}(Object(SV\StandardLib\XF\Template\Templater), Array, NULL)
#24 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('forum_list', Array)
#25 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#26 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Forum\\Listin...', 'public:forum_li...', Array)
#27 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#28 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#29 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#30 src/XF/App.php(2351): XF\Mvc\Dispatcher->run()
#31 src/XF.php(517): XF\App->run()
#32 index.php(20): XF::runApp('XF\\Pub\\App')
#33 {main}
Request state
array(4) {
  ["url"] => string(1) "/"
  ["referrer"] => string(22) "https://forum.me/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Clement

Freaky Coder
Staff member
In the widget of db tech purchases that is shown on the forum statistics, is he passing User instance ?
 

madness85

Member
In the widget of db tech purchases that is shown on the forum statistics, is he passing User instance ?
No idea. I don't have that widget working. It's actually not displaying the default xenforo forum statistics because of this error.
 

madness85

Member
Think I will abandoned your addons. I know this is probably just a hobby for you, but it doesn't look good to our members when issues take such a long time to fix.
 
Last edited:
Top