HelloZeroNet/ZeroNet · error · Error
renderMaquetteFunction was not found
Error message
renderMaquetteFunction was not found
What it means
Projector.remove throws this when the renderMaquetteFunction passed to it is not registered in the projector's internal renderFunctions list — i.e. remove was called with a function that was never added via projector.append/render, or the same function was already removed once.
Source
Thrown at plugins/UiConfig/media/js/all.js:954
merge: function (domNode, renderMaquetteFunction) {
projections.push(exports.dom.merge(domNode, renderMaquetteFunction(), projectionOptions));
renderFunctions.push(renderMaquetteFunction);
},
replace: function (domNode, renderMaquetteFunction) {
var vnode = renderMaquetteFunction();
createDom(vnode, domNode.parentNode, domNode, projectionOptions);
domNode.parentNode.removeChild(domNode);
projections.push(createProjection(vnode, projectionOptions));
renderFunctions.push(renderMaquetteFunction);
},
detach: function (renderMaquetteFunction) {
for (var i = 0; i < renderFunctions.length; i++) {
if (renderFunctions[i] === renderMaquetteFunction) {
renderFunctions.splice(i, 1);
return projections.splice(i, 1)[0];
}
}
throw new Error('renderMaquetteFunction was not found');
}
};
return projector;
};
}));
/* ---- utils/Animation.coffee ---- */
(function() {
var Animation;
Animation = (function() {
function Animation() {}
Animation.prototype.slideDown = function(elem, props) {
var cstyle, h, margin_bottom, margin_top, padding_bottom, padding_top, transition;View on GitHub (pinned to 454c0b2e7e)
Solutions
- Store the exact function reference passed to projector.append and pass that same reference to projector.remove.
- Guard against double removal by tracking removed state before calling remove.
- Remove the projector.tryRemove variant if available, or wrap remove in a existence check against your own registry of active render functions.
Example fix
// before
projector.remove(function () { return render(); }); // new closure, not the registered one
// after
var renderFn = function () { return render(); };
projector.append(domNode, renderFn);
// later, with the same reference:
projector.remove(renderFn); Defensive patterns
Strategy: try-catch
Validate before calling
var activeRenders = new Set();
function trackedAppend(projector, node, fn) {
activeRenders.add(fn);
projector.append(node, fn);
}
function trackedRemove(projector, fn) {
if (!activeRenders.has(fn)) return false;
activeRenders.delete(fn);
projector.remove(fn);
return true;
} Type guard
function isRegistered(fn, registry) {
return typeof fn === 'function' && registry.indexOf(fn) !== -1;
} Try / catch
try {
projector.remove(renderFn);
} catch (e) {
if (e.message === 'renderMaquetteFunction was not found') {
// already removed or never registered; safe to ignore or log
return;
}
throw e;
} Prevention
- Keep the exact function reference used in projector.append so remove uses identity match.
- Track registered render functions in your own registry/Set to make removal idempotent.
- Avoid recreating wrapper closures around render functions for append/remove calls.
- In hot-reload setups, re-register and remove using stable stored references.
When it happens
Trigger: Calling projector.remove(renderFn) with a function that was never passed to projector.append/render; calling remove twice for the same function; passing a different-but-similar closure (e.g. a re-created wrapper) instead of the exact reference used at append time.
Common situations: Component unmount logic where the render function reference was lost or recreated; hot-reload scenarios replacing the function identity; double-destroy of a component.
Related errors
- renderMaquetteFunction was not found
- Provide a transitions object to the projectionOptions to do
- Style values must be strings
- Property "className" is not supported, use "class".
- "class" property may not be updated. Use the "classes" prope
AI-assisted analysis of HelloZeroNet/ZeroNet@454c0b2e7e (2026-09-02).
Data as JSON: /api/errors/1c83ea16ffbfc5ff.
Report an issue: GitHub.