glanceapp/glance · error

page %d has no name

Error message

page %d has no name

What it means

Every page in the pages list must have a name (title); this validation fires when page.Title is empty for the page number given in the message (1-indexed). The name is used in the navigation sidebar.

Source

Thrown at internal/glance/config.go:490

			if user.PasswordHashString == "" {
				return fmt.Errorf("user %s must have a password or a password-hash set", username)
			}
		} else if len(user.Password) < 6 {
			return fmt.Errorf("the password for %s must be at least 6 characters", username)
		}
	}

	if config.Server.AssetsPath != "" {
		if _, err := os.Stat(config.Server.AssetsPath); os.IsNotExist(err) {
			return fmt.Errorf("assets directory does not exist: %s", config.Server.AssetsPath)
		}
	}

	for i := range config.Pages {
		page := &config.Pages[i]

		if page.Title == "" {
			return fmt.Errorf("page %d has no name", i+1)
		}

		if page.Width != "" && (page.Width != "wide" && page.Width != "slim" && page.Width != "default") {
			return fmt.Errorf("page %d: width can only be either wide or slim", i+1)
		}

		if page.DesktopNavigationWidth != "" {
			if page.DesktopNavigationWidth != "wide" && page.DesktopNavigationWidth != "slim" && page.DesktopNavigationWidth != "default" {
				return fmt.Errorf("page %d: desktop-navigation-width can only be either wide or slim", i+1)
			}
		}

		if len(page.Columns) == 0 {
			return fmt.Errorf("page %d has no columns", i+1)
		}

		if page.Width == "slim" {
			if len(page.Columns) > 2 {

View on GitHub (pinned to 91324e8de7)

Solutions

  1. Add a name: to the page indicated by the number in the message
  2. Check indentation — name must sit at the same level as columns/content
  3. Use the field name 'name', not 'title' or 'label'

Example fix

# before
pages:
  - columns:
      - size: full
# after
pages:
  - name: Home
    columns:
      - size: full
Defensive patterns

Strategy: validation

Validate before calling

for i, p := range cfg.Pages {
    if p.Title == "" {
        return fmt.Errorf("page %d missing name", i+1)
    }
}

Prevention

When it happens

Trigger: A pages list item lacking the name field, or where indentation places name outside the item; also an include that yields a page object without a title.

Common situations: Starting a new page block and forgetting name; YAML indentation issues after copy-pasting; renaming the field to title instead of name.

Related errors


AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15). Data as JSON: /api/errors/eb613d83ae914e22. Report an issue: GitHub.