{"record":{"id":"d216bd8ee3897031","repo":"octobercms/october","slug":"the-combiner-file-name-is-not-found","errorCode":null,"errorMessage":"The combiner file ':name' is not found.","messagePattern":"The combiner file ':name' is not found\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":500,"severity":"error","filePath":"modules/system/classes/CombineAssets.php","lineNumber":224,"sourceCode":"        $rewritePath = File::localToPublic(dirname($destination));\n\n        $combiner = $this->prepareCombiner($assets, $rewritePath, ['useCache' => false]);\n\n        $contents = $combiner->dump();\n\n        File::put($destination, $contents);\n    }\n\n    /**\n     * Returns the combined contents from a prepared cache identifier.\n     * @param string $cacheKey Cache identifier.\n     * @return string Combined file contents.\n     */\n    public function getContents($cacheKey)\n    {\n        $cacheInfo = $this->getCache($cacheKey);\n        if (!$cacheInfo) {\n            throw new ApplicationException(__(\"The combiner file ':name' is not found.\", ['name' => e($cacheKey)]));\n        }\n\n        // Ensure defaults\n        $cacheInfo += [\n            'version' => null,\n            'etag' => null,\n            'lastMod' => null,\n            'files' => null,\n            'path' => null,\n            'extension' => null,\n            'site' => null,\n            'theme' => null,\n        ];\n\n        $this->setActiveSiteContext($cacheInfo['site'], $cacheInfo['theme']);\n        $this->setLocalPath($cacheInfo['path']);\n\n        // Analyze cache information","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/system/classes/CombineAssets.php#L206-L242","documentation":"CombineAssets serves merged CSS/JS through the /combine route using a cache id that maps to the list of source files and their metadata. getContents($cacheKey) looks that id up via getCache(); on a miss (no stored record for the id) it throws ApplicationException naming the requested key. The URL itself is generated when a page renders, so a miss almost always means cached metadata was flushed or moved while some rendered output still references the old combined URL.","triggerScenarios":"Running php artisan cache:clear or the CMS combiner reset after pages were cached/CDN'd — old /combine/<id> URLs now 404 via this exception; switching CACHE_DRIVER (e.g. file to redis) so previously stored ids vanish; a load-balanced deployment where only one node shares the cache; a stale static-page cache or CDN edge still serving markup with the old asset URL.","commonSituations":"Right after deploys that clear caches; enabling/disabling plugins (bundle membership changes); mixed cache stores across environments; bots or browsers holding old HTML alive past a cache flush.","solutions":["Clear the CMS/page cache and reload the page so it re-renders with fresh combine URLs: php artisan cache:clear, then a hard refresh (the id is regenerated at render time).","Purge any static page cache or CDN layer still serving HTML that contains the old /combine/<id> URL.","Make sure every web node uses the same shared cache store (CACHE_DRIVER) so ids exist wherever the request lands.","If it recurs, confirm the cache store is not being cleared by cron/deploy scripts while long-lived HTML references it."],"exampleFix":"# before: deploy script clears cache but CDN keeps old HTML\nphp artisan cache:clear\n\n# after: flush HTML caches that reference combined asset URLs too\nphp artisan cache:clear && php artisan cms:cache:clear\ncdn-purge \"/*\"","handlingStrategy":"fallback","validationCode":"// Before serving a page that embeds combined asset URLs, confirm the key still resolves\nuse System\\Classes\\CombineAssets;\n\nfunction combinedAssetUrlExists(string $url): bool\n{\n    $key = basename(parse_url($url, PHP_URL_PATH));\n    try {\n        CombineAssets::instance()->getContents($key);\n        return true;\n    } catch (\\Throwable $e) {\n        return false;\n    }\n}","typeGuard":null,"tryCatchPattern":"// In a custom route/error handler around /combine\nuse October\\Rain\\Exception\\ApplicationException;\n\ntry {\n    return response(CombineAssets::instance()->getContents($cacheKey), 200, $headers);\n} catch (ApplicationException $e) {\n    // Regenerate or fail with a cacheable 404 so CDNs stop retrying the stale URL\n    return response()->noContent()->setStatusCode(404, 'Combined asset expired');\n}","preventionTips":["Flush page/CDN caches together with the application cache so HTML never outlives its combine ids.","Keep CACHE_DRIVER identical on every web node sharing /combine traffic.","Treat /combine/<id> as immutable-and-expiring: never hardcode combined URLs in templates."],"tags":["php","assets","cache","combine-assets","deployment"],"backgroundTag":"stale-cache-key","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}