{"record":{"id":"cb6d1a8e45b38bd9","repo":"glanceapp/glance","slug":"page-d-has-more-than-3-columns","errorCode":null,"errorMessage":"page %d has more than 3 columns","messagePattern":"page (.+?) has more than 3 columns","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":513,"sourceCode":"\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}\n\n\t\tfull := columnSizesCount[\"full\"]\n\n\t\tif full > 2 || full == 0 {","sourceCodeStart":495,"sourceCodeEnd":531,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L495-L531","documentation":"For any page not marked slim (default or wide), a maximum of 3 columns applies; this page has 4 or more. The three-column grid is the layout ceiling for normal-width pages.","triggerScenarios":"len(pages[N].columns) > 3 while page.Width != \"slim\" — i.e. a default/wide page with four or more column entries.","commonSituations":"Adding a fourth column for more widgets; generated configs that emit one column per widget group; misunderstanding that small columns don't bypass the cap.","solutions":["Cut the column list to 3 or fewer by merging widgets into shared columns","Reconsider layout: multiple small widgets can stack within one column"],"exampleFix":"# before\n  columns:\n    - size: full\n    - size: small\n    - size: small\n    - size: small\n# after\n  columns:\n    - size: full\n    - size: small\n    - size: small","handlingStrategy":"validation","validationCode":"for i, p := range cfg.Pages {\n    if p.Width != \"slim\" && len(p.Columns) > 3 {\n        return fmt.Errorf(\"page %d: max 3 columns\", i+1)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Stack widgets vertically inside a column instead of adding a 4th column","Automate config generation so the column cap is enforced by code"],"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"}