{"record":{"id":"263c0c3f341232d6","repo":"DioxusLabs/dioxus","slug":"dynamic-attr-anchor-must-reference-a-static-elemen","errorCode":null,"errorMessage":"dynamic attr anchor must reference a static element op","messagePattern":"dynamic attr anchor must reference a static element op","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/diff/template.rs","lineNumber":591,"sourceCode":"        self.parent_element_op_index() == other.parent_element_op_index()\n    }\n\n    pub(super) fn shares_insertion_position(self, other: Self) -> bool {\n        self.has_same_insertion_parent(other) && self.slot_target() == other.slot_target()\n    }\n\n    pub(super) fn static_attr_value_for_key(\n        self,\n        key: (&'static str, Option<&'static str>),\n    ) -> Option<&'static str> {\n        let element_op = self\n            .template_anchor()\n            .parent_element_op_index()\n            .expect(\"bad attr anchor\");\n        self.vnode\n            .template()\n            .static_element(element_op)\n            .expect(\"dynamic attr anchor must reference a static element op\")\n            .attribute_value(key)\n    }\n}\n\n#[derive(Clone, Copy)]\n/// A dynamic node slot owned by a [`DynamicAnchor`].\npub struct DynamicNodeSlot<'a> {\n    anchor: DynamicAnchor<'a>,\n    index: usize,\n}\n\nimpl<'a> DynamicNodeSlot<'a> {\n    /// The dynamic anchor that owns this node slot.\n    pub fn anchor(self) -> DynamicAnchor<'a> {\n        self.anchor\n    }\n\n    pub(crate) fn index(self) -> usize {","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/core/src/diff/template.rs#L573-L609","documentation":"Internal invariant: an attribute-bearing dynamic anchor must point at a static element op in the template. The expect fires when the anchor lacks that parent op, meaning template metadata is malformed.","triggerScenarios":"Thrown at packages/core/src/diff/template.rs:591 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["This is an internal invariant about dynamic attribute anchors. 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"}