Mick23 Posted June 22, 2023 Share Posted June 22, 2023 On my achievement rules page I am getting this error: [[Template core/admin/achievements/rulesListRows is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]] How can I fix this? I'm not sure what support tool I am meant to run. I have errors in the system logs that I believe relate to this: Stack trace: TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /applications/core/sources/Achievements/Actions/AbstractContentAchievementAction.php:252 Stack trace: #0 /applications/core/sources/Achievements/Actions/AbstractContentAchievementAction.php(252): in_array('IPS\\Content\\Com...', false) #1 /applications/core/extensions/core/AchievementAction/NewContentItem.php(139): IPS\core\Achievements\Actions\_AbstractContentAchievementAction->_nodeFilterDescription(Object(IPS\core\Achievements\Rule)) #2 /system/Theme/Theme.php(885) : eval()'d code(1443): IPS\core\extensions\core\AchievementAction\_NewContentItem->ruleDescription(Object(IPS\core\Achievements\Rule)) #3 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_achievements->rulesListRows(Object(IPS\Patterns\ActiveRecordIterator)) #4 /system/Theme/Theme.php(885) : eval()'d code(1354): IPS\Theme\_SandboxedTemplate->__call('rulesListRows', Array) #5 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_achievements->rulesList(Object(IPS\Patterns\ActiveRecordIterator), '', Array) #6 /applications/core/modules/admin/achievements/rules.php(94): IPS\Theme\_SandboxedTemplate->__call('rulesList', Array) #7 /system/Dispatcher/Controller.php(118): IPS\core\modules\admin\achievements\_rules->manage() #8 /system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #9 /applications/core/modules/admin/achievements/rules.php(45): IPS\Node\_Controller->execute() #10 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\achievements\_rules->execute() #11 /admin/index.php(13): IPS\_Dispatcher->run() #12 {main}/applications/core/sources/Achievements/Actions/AbstractContentAchievementAction.php:252 Stack trace: #0 /applications/core/sources/Achievements/Actions/AbstractContentAchievementAction.php(252): in_array('IPS\\Content\\Com...', false) #1 /applications/core/extensions/core/AchievementAction/NewContentItem.php(139): IPS\core\Achievements\Actions\_AbstractContentAchievementAction->_nodeFilterDescription(Object(IPS\core\Achievements\Rule)) #2 /system/Theme/Theme.php(885) : eval()'d code(1443): IPS\core\extensions\core\AchievementAction\_NewContentItem->ruleDescription(Object(IPS\core\Achievements\Rule)) #3 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_achievements->rulesListRows(Object(IPS\Patterns\ActiveRecordIterator)) #4 /system/Theme/Theme.php(885) : eval()'d code(1354): IPS\Theme\_SandboxedTemplate->__call('rulesListRows', Array) #5 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_achievements->rulesList(Object(IPS\Patterns\ActiveRecordIterator), '', Array) #6 /applications/core/modules/admin/achievements/rules.php(94): IPS\Theme\_SandboxedTemplate->__call('rulesList', Array) #7 /system/Dispatcher/Controller.php(118): IPS\core\modules\admin\achievements\_rules->manage() #8 /system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #9 /applications/core/modules/admin/achievements/rules.php(45): IPS\Node\_Controller->execute() #10 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\achievements\_rules->execute() #11 /admin/index.php(13): IPS\_Dispatcher->run() #12 {main} Backtrace: #0 /system/Theme/SandboxedTemplate.php(71): IPS\_Log::log(Object(TypeError), 'template_error') #1 /system/Theme/Theme.php(885) : eval()'d code(1354): IPS\Theme\_SandboxedTemplate->__call('rulesListRows', Array) #2 /system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_admin_achievements->rulesList(Object(IPS\Patterns\ActiveRecordIterator), '', Array) #3 /applications/core/modules/admin/achievements/rules.php(94): IPS\Theme\_SandboxedTemplate->__call('rulesList', Array) #4 /system/Dispatcher/Controller.php(118): IPS\core\modules\admin\achievements\_rules->manage() #5 /system/Node/Controller.php(69): IPS\Dispatcher\_Controller->execute() #6 /applications/core/modules/admin/achievements/rules.php(45): IPS\Node\_Controller->execute() #7 /system/Dispatcher/Dispatcher.php(153): IPS\core\modules\admin\achievements\_rules->execute() #8 /admin/index.php(13): IPS\_Dispatcher->run() #9 {main} Loaded hooks: applications/axenfontawesome6/hooks/loadJSandCSS.php applications/ignoretopics/hooks/itFurl.php Cheers, Mick Link to comment Share on other sites More sharing options...
Marc Posted June 22, 2023 Share Posted June 22, 2023 Please disable 3rd party items and test this again first of all. I see there are 2 loaded at the point those errors occurred Link to comment Share on other sites More sharing options...
Mick23 Posted June 22, 2023 Author Share Posted June 22, 2023 I disabled them and got the same error. Link to comment Share on other sites More sharing options...
Mick23 Posted June 22, 2023 Author Share Posted June 22, 2023 I figured out the issue - there were a couple of entries in core_achievements_rules for the "Movies" application that is no longer installed. Link to comment Share on other sites More sharing options...
Marc Posted June 22, 2023 Share Posted June 22, 2023 Glad to hear you have that issue resolved 🙂 Link to comment Share on other sites More sharing options...
Adriano Faria Posted June 22, 2023 Share Posted June 22, 2023 5 minutes ago, Marc Stridgen said: Glad to hear you have that issue resolved 🙂 This was reported as a bug in Core a long time ago and should be checked if it’s back:  This is not related to the 3rd-party resource. Link to comment Share on other sites More sharing options...
Marc Posted June 22, 2023 Share Posted June 22, 2023 Yes, the bug was fixed in 4.7.1. It may well be the resource was removed before that point Adriano Faria 1 Link to comment Share on other sites More sharing options...
Recommended Posts