{"record":{"id":"52930ebe265b9dfd","repo":"theonedev/onedev","slug":"markup-not-found-component","errorCode":null,"errorMessage":"Markup not found. Component: ","messagePattern":"Markup not found\\. Component: ","errorType":"exception","errorClass":"MarkupException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/org/apache/wicket/Component.java","lineNumber":2552,"sourceCode":"\t\t\tmarkupId = getMarkupId();\n\t\t}\n\t\treturn markupId;\n\t}\n\n\n\t/**\n\t * THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. DO NOT USE IT.\n\t * <p>\n\t * Renders the component at the current position in the given markup stream. The method\n\t * onComponentTag() is called to allow the component to mutate the start tag. The method\n\t * onComponentTagBody() is then called to permit the component to render its body.\n\t */\n\tpublic final void internalRenderComponent()\n\t{\n\t\tfinal IMarkupFragment markup = getMarkup();\n\t\tif (markup == null)\n\t\t{\n\t\t\tthrow new MarkupException(\"Markup not found. Component: \" + toString());\n\t\t}\n\n\t\tfinal MarkupStream markupStream = new MarkupStream(markup);\n\n\t\t// Get mutable copy of next tag\n\t\tfinal ComponentTag openTag = markupStream.getTag();\n\t\tfinal ComponentTag tag = openTag.mutable();\n\n\t\t// call application-wide tag listeners\n\t\tgetApplication().getOnComponentTagListeners().onComponentTag(this, tag);\n\n\t\t// Call any tag handler\n\t\tonComponentTag(tag);\n\n\t\t// If we're an openclose tag\n\t\tif (!tag.isOpenClose() && !tag.isOpen())\n\t\t{\n\t\t\t// We were something other than <tag> or <tag/>","sourceCodeStart":2534,"sourceCodeEnd":2570,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/org/apache/wicket/Component.java#L2534-L2570","documentation":"internalRenderComponent() re-checks getMarkup() before rendering the component's tag and throws MarkupException (a WicketRuntimeException subclass) when markup is null. This is the check executed during the component render head path; it differs from 1052 only in exception type and timing within the render pipeline.","triggerScenarios":"Rendering a component (e.g. during respond phase / header contribution) whose markup is not resolvable: missing HTML file, missing wicket:id tag, Fragment without matching <wicket:fragment>, or component re-rendered after markup detached.","commonSituations":"Ajax re-render of a component whose markup file was removed; header contributions (renderHead) triggering render for orphan components; Border/Fragment misuse; page reload after hot-redeploy with stale component tree.","solutions":["Ensure the component's markup file and wicket:id tag exist as for 1052.","For Ajax targets, verify targeted components are still in the page's component hierarchy.","Restart/redeploy cleanly to flush stale markup caches.","Use IMarkupCache.clear() in dev settings during hot code swaps.","Check custom borders/fragments supply a valid markup provider."],"exampleFix":"// before\nfragment = new Fragment(\"id\", \"missingFragment\", page);\n// after\n// page.html must contain <wicket:fragment wicket:id=\"missingFragment\">...</wicket:fragment>\nfragment = new Fragment(\"id\", \"existingFragment\", page);","handlingStrategy":"validation","validationCode":"if (component.getMarkup() == null) { return; } // skip render, or fix markup","typeGuard":"boolean renderable(Component c) { return c.getMarkup() != null; }","tryCatchPattern":"try { target.add(component); } catch (MarkupException e) { log.error(\"Ajax target component lost markup: \" + component.getId(), e); }","preventionTips":["Verify Ajax-targeted components remain in the page hierarchy","Restart cleanly after hot-redeploy to avoid stale markup caches","Check Fragment markupProvider contains the named fragment"],"tags":["wicket","markup","rendering"],"backgroundTag":"resource-not-found","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}