{"record":{"id":"5f4769c79a6ab3a2","repo":"HelloZeroNet/ZeroNet","slug":"rendermaquettefunction-was-not-found-5f4769","errorCode":null,"errorMessage":"renderMaquetteFunction was not found","messagePattern":"renderMaquetteFunction was not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/UiConfig/media/js/lib/maquette.js","lineNumber":765,"sourceCode":"            merge: function (domNode, renderMaquetteFunction) {\n                projections.push(exports.dom.merge(domNode, renderMaquetteFunction(), projectionOptions));\n                renderFunctions.push(renderMaquetteFunction);\n            },\n            replace: function (domNode, renderMaquetteFunction) {\n                var vnode = renderMaquetteFunction();\n                createDom(vnode, domNode.parentNode, domNode, projectionOptions);\n                domNode.parentNode.removeChild(domNode);\n                projections.push(createProjection(vnode, projectionOptions));\n                renderFunctions.push(renderMaquetteFunction);\n            },\n            detach: function (renderMaquetteFunction) {\n                for (var i = 0; i < renderFunctions.length; i++) {\n                    if (renderFunctions[i] === renderMaquetteFunction) {\n                        renderFunctions.splice(i, 1);\n                        return projections.splice(i, 1)[0];\n                    }\n                }\n                throw new Error('renderMaquetteFunction was not found');\n            }\n        };\n        return projector;\n    };\n}));\n","sourceCodeStart":747,"sourceCodeEnd":771,"githubUrl":"https://github.com/HelloZeroNet/ZeroNet/blob/454c0b2e7e000fda7000cba49027541fbf327b96/plugins/UiConfig/media/js/lib/maquette.js#L747-L771","documentation":"Projector.unregisterRenderMaquetteFunction removes a render function from its internal registry by scanning for it; if the function was never registered (or already removed), the splice loop completes without finding it and this error is thrown.","triggerScenarios":"Calling projector.unregisterRenderMaquetteFunction(fn) with a function that was never passed to projector.registerRenderMaquetteFunction, or unregistering the same function twice.","commonSituations":"Component teardown code unregistering handlers that were never registered due to an early error/branch, double-destroy of a component, or unregistering a wrapped/bound copy instead of the exact registered reference.","solutions":["Only unregister the exact function reference previously registered (avoid bind/arrow wrappers).","Track registration state and skip unregister when already removed.","Wrap unregister in a guard that checks membership before calling."],"exampleFix":"// before\nprojector.unregisterRenderMaquetteFunction(this.render);\n// after\nif (this.registered) {\n  projector.unregisterRenderMaquetteFunction(this.render);\n  this.registered = false;\n}","handlingStrategy":"try-catch","validationCode":"function isRegistered(projector, fn) {\n  try {\n    var renderFns = projector.renderFunctions || [];\n    return renderFns.indexOf(fn) !== -1;\n  } catch (e) { return false; }\n}\n","typeGuard":"function canUnregister(projector, fn) {\n  return typeof fn === 'function' && (projector.renderFunctions || []).indexOf(fn) !== -1;\n}","tryCatchPattern":"try {\n  projector.unregisterRenderMaquetteFunction(this.render);\n} catch (e) {\n  if (e.message === 'renderMaquetteFunction was not found') { /* already unregistered; ignore */ }\n  else { throw e; }\n}","preventionTips":["Always pair register/unregister with the exact same function reference.","Track registered state (boolean) on the component and unregister only once.","Avoid registering bound or inline-wrapped copies of the render function."],"tags":["virtual-dom","projector","lifecycle"],"backgroundTag":"unregister-unknown-function","analyzedSha":"454c0b2e7e000fda7000cba49027541fbf327b96","analyzedAt":"2026-09-02T19:46:57.278Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T02:17:09.455Z"}