{"record":{"id":"f780a5ef0e7bfc91","repo":"DioxusLabs/dioxus","slug":"static-element","errorCode":null,"errorMessage":"static element","messagePattern":"static element","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/diff/template.rs","lineNumber":46,"sourceCode":"    fn new(vnode: &'a VNode, op: usize, path: TemplatePath, anchor_idx: Option<usize>) -> Self {\n        Self {\n            vnode,\n            op,\n            path,\n            anchor_idx,\n        }\n    }\n\n    /// The flat template op for this element.\n    pub fn op(self) -> usize {\n        self.op\n    }\n\n    fn template_element(self) -> StaticTemplateElement<'a> {\n        self.vnode\n            .template()\n            .static_element(self.op)\n            .expect(\"static element\")\n    }\n\n    /// The element tag.\n    pub fn tag(self) -> &'static str {\n        self.template_element().tag()\n    }\n\n    /// The element namespace.\n    pub fn namespace(self) -> Option<&'static str> {\n        self.template_element().namespace()\n    }\n\n    /// The structural anchor for this static node when it has one.\n    pub fn anchor_index(self) -> Option<usize> {\n        self.anchor_idx\n    }\n\n    /// Iterate static template attributes for this element.","sourceCodeStart":28,"sourceCodeEnd":64,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core/src/diff/template.rs#L28-L64","documentation":"`StaticTemplateElement::template_element` looks up the flat template op as a static element and `expect`s it to be one. This panic fires if the op index actually points at a non-element node — an internal inconsistency in template op indexing, not user error.","triggerScenarios":"Thrown at packages/core/src/diff/template.rs:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant about static elements in templates. Report it with a minimal reproduction to the Dioxus issue tracker."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}