mdcms/docs/knownbugs.md
Claude 431b1c054c
Fix: raise on config.yml parse errors instead of silently returning empty dict
A YAML parse error in config.yml (e.g. a stray tab character) caused
read_config to swallow the exception and return {}, disabling categories
and producing a broken nav.yml with no variants fields and wrong filenames.
read_config now raises ClickException on both OSError and YAMLError.

Documented in docs/knownbugs.md and docs/unreleased.md.

https://claude.ai/code/session_01Xs5GyREFhjWxhS1UhW2wA8
2026-05-19 14:15:38 +00:00

997 B

Known bugs

Bugs that have been identified but not yet fixed. Fixed bugs are moved to the release notes.


Fixed in development (not yet released)

config.yml YAML parse errors were silently swallowed

Symptom: A malformed config.yml (e.g. a stray tab character, which YAML forbids as a token starter) caused read_config to catch the YAMLError and return an empty dict. The build would proceed with no config — categories disabled, no default category code — producing a nav.yml that omitted variants fields and listed category variant files (e.g. page.current.md) as plain pages. Pages with category variants would not appear in the sidebar.

Root cause: read_config caught (OSError, yaml.YAMLError) in a single block and silently returned {} on any error.

Fix: read_config now raises click.ClickException on both OSError and yaml.YAMLError, aborting the build with a descriptive error message instead of continuing with an empty config.