{"record":{"id":"2d2d326e33b95588","repo":"glanceapp/glance","slug":"page-d-is-slim-and-cannot-have-more-than-2-column","errorCode":null,"errorMessage":"page %d is slim and cannot have more than 2 columns","messagePattern":"page (.+?) is slim and cannot have more than 2 columns","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":509,"sourceCode":"\t\t}\n\n\t\tif page.Width != \"\" && (page.Width != \"wide\" && page.Width != \"slim\" && page.Width != \"default\") {\n\t\t\treturn fmt.Errorf(\"page %d: width can only be either wide or slim\", i+1)\n\t\t}\n\n\t\tif page.DesktopNavigationWidth != \"\" {\n\t\t\tif page.DesktopNavigationWidth != \"wide\" && page.DesktopNavigationWidth != \"slim\" && page.DesktopNavigationWidth != \"default\" {\n\t\t\t\treturn fmt.Errorf(\"page %d: desktop-navigation-width can only be either wide or slim\", i+1)\n\t\t\t}\n\t\t}\n\n\t\tif len(page.Columns) == 0 {\n\t\t\treturn fmt.Errorf(\"page %d has no columns\", i+1)\n\t\t}\n\n\t\tif page.Width == \"slim\" {\n\t\t\tif len(page.Columns) > 2 {\n\t\t\t\treturn fmt.Errorf(\"page %d is slim and cannot have more than 2 columns\", i+1)\n\t\t\t}\n\t\t} else {\n\t\t\tif len(page.Columns) > 3 {\n\t\t\t\treturn fmt.Errorf(\"page %d has more than 3 columns\", i+1)\n\t\t\t}\n\t\t}\n\n\t\tcolumnSizesCount := make(map[string]int)\n\n\t\tfor j := range page.Columns {\n\t\t\tcolumn := &page.Columns[j]\n\n\t\t\tif column.Size != \"small\" && column.Size != \"full\" {\n\t\t\t\treturn fmt.Errorf(\"column %d of page %d: size can only be either small or full\", j+1, i+1)\n\t\t\t}\n\n\t\t\tcolumnSizesCount[page.Columns[j].Size]++\n\t\t}","sourceCodeStart":491,"sourceCodeEnd":527,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L491-L527","documentation":"A page marked width: slim is limited to at most 2 columns, and this page has 3+. Slim pages use a narrower layout that cannot fit three columns, so validation rejects it.","triggerScenarios":"pages[N].width == \"slim\" together with len(pages[N].columns) > 2. Note this check runs even if width was defaulted or invalid (the else-branch handles non-slim), so slim + 3 columns is the exact trigger.","commonSituations":"Copying a 3-column page and adding width: slim; deciding to slim a page without restructuring its columns.","solutions":["Reduce the page to 2 columns or fewer, merging widget lists","Or drop the slim width (set wide/default) to keep 3 columns"],"exampleFix":"# before\n- name: Home\n  width: slim\n  columns:\n    - size: full\n    - size: small\n    - size: small\n# after\n- name: Home\n  width: slim\n  columns:\n    - size: full\n    - size: small","handlingStrategy":"validation","validationCode":"for i, p := range cfg.Pages {\n    if p.Width == \"slim\" && len(p.Columns) > 2 {\n        return fmt.Errorf(\"page %d: slim allows max 2 columns\", i+1)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Decide width and column count together, never independently","Keep a matrix note: slim<=2, default/wide<=3"],"tags":["glance","configuration","layout","validation"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}