Fixed Error after editing dropdown icon

Xon

Well-known member
Affected version
2.3.3
Code:
InvalidArgumentException: Invalid content type: editor_dropdown src/XF/Service/Icon/UsageAnalyzerService.php:98
Generated by: Unknown account Oct 2, 2024 at 4:34 AM
Stack trace
#0 src/XF/Service/Icon/UsageAnalyzerService.php(81): XF\Service\Icon\UsageAnalyzerService->setContentType('editor_dropdown')
#1 src/XF/Container.php(275): XF\Service\Icon\UsageAnalyzerService->__construct(Object(XF\Pub\App), 'editor_dropdown')
#2 src/XF/App.php(1968): XF\Container->createObject('XF\\Service\\Icon...', Array)
#3 src/XF/Container.php(233): XF\App->XF\{closure}('XF\\Service\\Icon...', Array, Object(XF\Container))
#4 src/XF/App.php(3550): XF\Container->create('service', 'XF\\Service\\Icon...', Array)
#5 src/XF/Job/IconUsage.php(36): XF\App->service('XF\\Service\\Icon...', 'editor_dropdown')
#6 src/XF/Job/Manager.php(275): XF\Job\IconUsage->run(8)
#7 src/addons/SV/CachePermissionChecks/XF/Job/Manager.php(24): XF\Job\Manager->runJobInternal(Array, 8)
#8 src/addons/SV/SlowQueryLogger/XF/Job/Manager.php(34): SV\CachePermissionChecks\XF\Job\Manager->runJobInternal(Array, 8)
#9 src/XF/Job/Manager.php(205): SV\SlowQueryLogger\XF\Job\Manager->runJobInternal(Array, 8)
#10 src/XF/Job/Manager.php(89): XF\Job\Manager->runJobEntry(Array, 8)
#11 job.php(46): XF\Job\Manager->runQueue(false, 8)
#12 {main}

Grep of XF2.3.3 source code shows $iconRepo->enqueueUsageAnalyzer('editor_dropdown'); but nothing actually implements editor_dropdown.
 
I think this should be editor, not editor_dropdown

Also, I think enqueueUsageAnalyzer should be called in the delete method to prune unused icons
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.4).

Change log:
Fix some icon usage analysis issues when editing and deleting editor drop-downs and BBCodes
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom