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

Server issue Smilie Error

Affected version
2.0.2

Bryan

Active member
#1
I have received 23 pages of this error today, any ideas what I can do to stop it?

Nothing has been done to the site in the last 24 hours, it just started out of nowhere.

Code:
ErrorException: [E_NOTICE] Undefined index: smilie_id src/XF/Str/Formatter.php:153
Generated by: Unknown account Feb 5, 2018 at 12:26 PM
Stack trace
#0 src/XF/Str/Formatter.php(153): XF::handlePhpError(8, '[E_NOTICE] Unde...', '/home/****/publ...', 153, Array)
#1 src/XF/App.php(1138): XF\Str\Formatter->addSmilies(Array)
#2 src/XF/Container.php(28): XF\App->XF\{closure}(Object(XF\Container))
#3 src/XF/App.php(2371): XF\Container->offsetGet('string.formatte...')
#4 src/XF/Mvc/Entity/Entity.php(155): XF\App->stringFormatter()
#5 src/XF/Mvc/Entity/Entity.php(97): XF\Mvc\Entity\Entity->get('title')
#6 src/XF/Mvc/Router.php(543): XF\Mvc\Entity\Entity->offsetGet('title')
#7 [internal function]: XF\Mvc\Router->XF\Mvc\{closure}(Array)
#8 src/XF/Mvc/Router.php(565): preg_replace_callback('#:(?:\\+)?int(_p...', Object(Closure), ':int<thread_id,...')
#9 src/XF/Mvc/Router.php(444): XF\Mvc\Router->buildRouteUrl('threads', Array, '', Object(XF\Entity\Thread), Array)
#10 src/XF/Mvc/Router.php(414): XF\Mvc\Router->buildLinkPath('threads', Object(XF\Entity\Thread), Array)
#11 src/XF/Mvc/Controller.php(727): XF\Mvc\Router->buildLink('threads', Object(XF\Entity\Thread), Array)
#12 src/XF/Pub/Controller/Thread.php(31): XF\Mvc\Controller->buildLink('threads', Object(XF\Entity\Thread), Array)
#13 src/addons/XFMG/XF/Pub/Controller/Thread.php(11): XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#14 src/XF/Mvc/Dispatcher.php(249): XFMG\XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#15 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', 'html', Object(XF\Mvc\ParameterBag), 'forums', Object(XFMG\XF\Pub\Controller\Thread), NULL)
#16 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#17 src/XF/App.php(1880): XF\Mvc\Dispatcher->run()
#18 src/XF.php(328): XF\App->run()
#19 index.php(13): XF::runApp('XF\\Pub\\App')
#20 {main}
Request state
array(4) {
  ["url"] => string(35) "/threads/fuel-pump-oil-leak.108313/"
  ["referrer"] => string(23) "https://www.google.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Chris D

XenForo developer
Staff member
#2
The error suggests that the smilie cache being passed into the string formatter is an array, but one that doesn't contain a "smilie_id" entry.

I'm not sure what would cause this and after some testing, I can't see how XF would be doing this.

Have you recently done anything related to smilies? Added new ones? Changed existing ones?
 

Bryan

Active member
#3
Nothing to the smilies no, I know this is reaching but I discovered a problem with XF2 and APCu tonight where enabling the cache triggers "zend_mm_heap corrupted" errors in the apache log, these errors were extremely often around the same time as the errors above.

I have since cured the corrupted heap errors by changing apc.serializer to php from default, it has also stopped the smilie error.

XF1 previously had no problems on the same APC setup but after hunting around google, the corrupted heap errors have appeared for quite a few php apps.

Do you think the APCu problems could have caused this error?
 

Chris D

XenForo developer
Staff member
#4
Yeah quite possibly. The smilies are stored in the data registry which is cached as much as possible. If that cache was corrupted somehow then it could certainly explain the error.

If the errors have now stopped, I think that should be ok now, but keep an eye on it.