{"record":{"id":"84367d113ebb6fd1","repo":"octobercms/october","slug":"snippet-with-the-requested-code-code-was-not-foun","errorCode":null,"errorMessage":"Snippet with the requested code :code was not found in the theme.","messagePattern":"Snippet with the requested code :code was not found in the theme\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/cms/widgets/SnippetLookup.php","lineNumber":113,"sourceCode":"     */\n    public function onSearch()\n    {\n        $this->setSearchTerm(Input::get('search'));\n\n        return $this->updateList();\n    }\n\n    /**\n     * onGetInspectorConfiguration\n     */\n    public function onGetInspectorConfiguration()\n    {\n        $configuration = [];\n        $snippetCode = post('snippet');\n        $componentClass = post('component');\n\n        if ($componentClass && !class_exists($componentClass)) {\n            throw new ApplicationException(__(\"Snippet with the requested code :code was not found in the theme.\", ['code' => $componentClass]));\n        }\n\n        if (strlen($snippetCode)) {\n            $snippet = SnippetManager::instance()->findByCodeOrComponent($this->getTheme(), $snippetCode, $componentClass);\n            if (!$snippet) {\n                throw new ApplicationException(__(\"Snippet with the requested code :code was not found in the theme.\", ['code' => $snippetCode]));\n            }\n\n            $configuration = $snippet->getProperties();\n        }\n\n        return [\n            'configuration' => [\n                'properties' => $configuration,\n                'title' => $snippet->getName(),\n                'description' => $snippet->getDescription()\n            ]\n        ];","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/widgets/SnippetLookup.php#L95-L131","documentation":"Error \"Snippet with the requested code :code was not found in the theme.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/widgets/SnippetLookup.php:113 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}