Issue Bug Under Review

#105618Icon with identifier "default-not-found" is not registered

Marco von Arx 11/18/24, 05:13 updated 11/11/26, 09:42

Description

At irregular intervals, the T3 backend stops working. The IconRegistry throws the error: “Icon with identifier ‘default-not-found’ is not registered.”
Investigations show that the cache file suddenly has no entries. The cache file typo3temp/var/cache/data/assets/BackendIcons_xxxx contained the value a:0:{}.
It appears that an error occurs during the saving process. The website has 20+ backend users who make numerous content changes daily.
After clearing all caches the backend starts working again.

My workaround is to Xclass IconRegistry and check if $cacheEntry contains a non-empty array.

    protected function getCachedBackendIcons()
    {
        $cacheIdentifier = $this->getBackendIconsCacheIdentifier();
        $cacheEntry = $this->cache->get($cacheIdentifier);  

        if (is_array($cacheEntry)
            && count($cacheEntry) > 0) {
            $this->icons = $cacheEntry;
        } else {

            if ($cacheEntry !== false) {

                //$reportEmailAddress = '';
                //$subject = 'Icon Registry Fehler: ' . ($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] ?? '');
                //$message = 'cacheEntry ist vorhanden, aber das Array ist leer.';
                //mail($reportEmailAddress, $subject, $message);

            }

            $this->registerBackendIcons();
            // all found icons should now be present, for historic reasons now merge w/ the statically declared icons
            $this->icons = array_merge($this->icons, $this->iconAliases, $this->staticIcons);
            $this->cache->set($cacheIdentifier, $this->icons);
        }
        // if there's now at least one icon registered, consider it successful
        if (is_array($this->icons) && (count($this->icons) >= count($this->staticIcons))) {
            $this->backendIconsInitialized = true;
        }
    }

It seems that others are experiencing the same issue (https://stackoverflow.com/questions/66821084/icon-with-identifier-default-not-found-is-not-registered)

Reviews 1

History 612

  1. Garvin Hicking commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2024-11-18T06:19:48+00:00" > 11/18/24, 06:19 </span>

    Could you describe your webserver setup (webserver time, load, filesystem, memory, memory load)?

    If you xclass this, just before the ->set command, please do a check if this->icons is empty, that would allow to catch the request that causes this. In this case please log the request uri and get/post data and memory_get_usage() to see at which point this may be caused.

  2. Marco von Arx commented <span data-processor="relativetime" data-value="2024-11-19T11:57:03+00:00" > 11/19/24, 11:57 </span>

    I have added log statements to gather more details and will share the findings as soon as they are available.

  3. Marco von Arx commented <span data-processor="relativetime" data-value="2025-01-28T12:50:37+00:00" > 01/28/25, 12:50 </span>

    We have encountered multiple occurrences of this issue.
    The log files do not provide any conclusive information.
    Memory consumption is approximately 2MB, effectively ruling out a memory-related problem.
    The issue is always triggered by a frontend request.
    It can be hypothesized that the cache becomes inconsistent under a high volume of concurrent requests.

  4. Gerrit Code Review pushed patch set 1 for main to change 89177 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2025-04-21T06:38:10+00:00" > 04/21/25, 06:38 </span>

  5. Benjamin Franzke commented <span data-processor="relativetime" data-value="2025-04-22T08:19:42+00:00" > 04/22/25, 08:19 </span>

    > The issue is always triggered by a frontend request.
    > It can be hypothesized that the cache becomes inconsistent under a high volume of concurrent requests.

    High volume is quite unrealistic as you reported there is a valid a:0:{} entry in cache, not some mangled value, this is really an empty array that was serialized…

    Can you check if there is any extension installed that extends/XCLASSES IconRegistry and fiddles with the $icons or $backendIconsInitialized properties?

    We can of course fix the consequence by recreating the cache, but we should track down why an invalid value was cached, because otherwise we’ll be recreating the cache over and over again, which isn’t useful either (from a performance perspective).

  6. Marco von Arx commented <span data-processor="relativetime" data-value="2025-06-25T12:34:41+00:00" > 06/25/25, 12:34 </span>

    Using the hook ‘t3lib/cache/frontend/class.t3lib_cache_frontend_variablefrontend.php’ , I can log the call stack whenever an empty array is being stored. I XCLASSed IconRegistry to log failing calls but do not change $icons or $backendIconsInitialized properties.

    STACK:
    #0 [internal function](): Webgearing\Wgmonitor\Hook\CacheHook->logSetVariable()
    #1 typo3_src-12.4.31/typo3/sysext/core/Classes/Utility/GeneralUtility.php(2902): call_user_func_array()
    #2 typo3_src-12.4.31/typo3/sysext/core/Classes/Cache/Frontend/VariableFrontend.php(57): TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction()
    #3 public_html/typo3conf/ext/wgmonitor/Classes/Xclass/Core/Imaging/IconRegistry.php(75): TYPO3\CMS\Core\Cache\Frontend\VariableFrontend->set()
    #4 typo3_src-12.4.31/typo3/sysext/core/Classes/Imaging/IconRegistry.php(234): Webgearing\Wgmonitor\Xclass\Core\Imaging\IconRegistry->getCachedBackendIcons()
    #5 typo3_src-12.4.31/typo3/sysext/core/Classes/Imaging/IconRegistry.php(223): TYPO3\CMS\Core\Imaging\IconRegistry->initialize()
    #6 typo3_src-12.4.31/typo3/sysext/core/Classes/Utility/GeneralUtility.php(3023): TYPO3\CMS\Core\Imaging\IconRegistry->__construct()
    #7 typo3_src-12.4.31/typo3/sysext/core/Classes/Package/AbstractServiceProvider.php(209): TYPO3\CMS\Core\Utility\GeneralUtility::makeInstanceForDi()
    #8 typo3_src-12.4.31/typo3/sysext/core/Classes/ServiceProvider.php(331): TYPO3\CMS\Core\Package\AbstractServiceProvider::new()
    #9 public_html/typo3temp/var/cache/code/di/DependencyInjectionContainer_8afa372657519d68a82ee799e8aa23c1619fe85e.php(11087): TYPO3\CMS\Core\ServiceProvider::getIconRegistry()
    #10 typo3_src-12.4.31/vendor/symfony/dependency-injection/Container.php(231): DependencyInjectionContainer_8afa372657519d68a82ee799e8aa23c1619fe85e::getIconRegistryDecorated1Service()
    #11 typo3_src-12.4.31/vendor/symfony/dependency-injection/Container.php(211): Symfony\Component\DependencyInjection\Container::make()
    #12 typo3_src-12.4.31/typo3/sysext/core/Classes/Utility/GeneralUtility.php(2988): Symfony\Component\DependencyInjection\Container->get()
    #13 public_html/typo3conf/ext/container/Classes/Tca/Registry.php(134): TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance()
    #14 public_html/typo3conf/ext/container/Classes/Listener/BootCompleted.php(32): B13\Container\Tca\Registry->registerIcons()
    #15 typo3_src-12.4.31/typo3/sysext/core/Classes/EventDispatcher/EventDispatcher.php(42): B13\Container\Listener\BootCompleted->__invoke()
    #16 typo3_src-12.4.31/typo3/sysext/core/Classes/Core/Bootstrap.php(155): TYPO3\CMS\Core\EventDispatcher\EventDispatcher->dispatch()
    #17 typo3_src-12.4.31/index.php(20): TYPO3\CMS\Core\Core\Bootstrap::init()
    #18 typo3_src-12.4.31/index.php(21): {closure}()