Component not rendering
Who this page is for
| Audience | Why it matters to you |
|---|---|
| All engineers | The most common dev-loop symptom |
Match your symptom
| Symptom | Likely lane |
|---|---|
| Not offered in the insert list | Policy/group lane ↓ |
| Renders nothing (blank) | Script/model lane ↓ |
| Renders raw HTL source or placeholder text | Resolution lane ↓ |
| Wrong variant renders | Selector/superType — Sling cheatsheet |
| Works on author, dead on publish | Publish lane ↓ |
Policy/group lane
Component group set? (componentGroup in .content.xml) → Template policy allows that group for the target container? (Session 6) → Component not hidden (.hidden group)? Most "my new component doesn't exist" cases end at the policy checkbox.
Resolution lane
/system/console/jcrresolver with the content path: does the resourceType resolve to YOUR component? → Content node's sling:resourceType spelled/pathed right? → Script named correctly (componentName.html)? → For selector variants, walk the resolution order.
Script/model lane
error.log while reproducing:
| Log says | Fix |
|---|---|
| org.apache.sling.scripting errors (HTL compile) | Syntax error in the script — line number is right there |
| Model class not found / adaptTo null | Model injection failures |
| Nothing at all, HTML has empty component div | data-sly-test guarding everything false? Empty content + missing placeholder handling (Lab 4 empty-state) |
Publish lane
Works on author only: component code replicated? (it isn't — code DEPLOYS; is the deploy on publish current?) → Content + referenced fragments/XF published? → Anonymous can read the content (ACL)? → Dispatcher filter allows the URL/selectors? (dispatcher checks) → clientlib category allowed via /etc.clientlibs (styles "missing" ≠ component missing).