{"record":{"id":"c59077c77f4edf0b","repo":"glanceapp/glance","slug":"page-d-width-can-only-be-either-wide-or-slim","errorCode":null,"errorMessage":"page %d: width can only be either wide or slim","messagePattern":"page (.+?): width can only be either wide or slim","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":494,"sourceCode":"\t\t\treturn fmt.Errorf(\"the password for %s must be at least 6 characters\", username)\n\t\t}\n\t}\n\n\tif config.Server.AssetsPath != \"\" {\n\t\tif _, err := os.Stat(config.Server.AssetsPath); os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"assets directory does not exist: %s\", config.Server.AssetsPath)\n\t\t}\n\t}\n\n\tfor i := range config.Pages {\n\t\tpage := &config.Pages[i]\n\n\t\tif page.Title == \"\" {\n\t\t\treturn fmt.Errorf(\"page %d has no name\", i+1)\n\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 {","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L476-L512","documentation":"A page's optional width setting must be one of wide, slim, or default when set. The message text mentions only wide or slim, but the code also accepts default and the empty string (unset). Any other value for the page at the given index fails validation.","triggerScenarios":"Setting pages[N].width to a string other than wide/slim/default, e.g. 'narrow', 'WIDE', or 'thin'. Empty string is allowed (treated as default).","commonSituations":"Guessing an undocumented width value; case mismatch ('Wide'); stale configs from versions or forks with different accepted values; copy-paste from a different dashboard tool.","solutions":["Set width to wide, slim, or default — or delete the line entirely for default behavior","Check spelling and case — values are lowercase","Confirm against the page-width documentation for the version in use"],"exampleFix":"# before\n- name: Home\n  width: narrow\n# after\n- name: Home\n  width: slim","handlingStrategy":"type-guard","validationCode":"var pageWidths = map[string]bool{\"wide\": true, \"slim\": true, \"default\": true, \"\": true}\nfor i, p := range cfg.Pages {\n    if !pageWidths[p.Width] {\n        return fmt.Errorf(\"page %d bad width %q\", i+1, p.Width)\n    }\n}","typeGuard":"func isValidPageWidth(w string) bool {\n    switch w {\n    case \"wide\", \"slim\", \"default\", \"\":\n        return true\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Offer only wide/slim/default in config generators","Add a schema (e.g. JSON Schema for YAML) to the editor for autocomplete"],"tags":["glance","configuration","validation"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}