Unable to generate valid slug for Category ".."
Author: minchinwebCreated Aug 4, 2026Updated Sep 13, 2026
Labelsbug
- I have read the Filing Issues and subsequent “How to Get Help” sections of the documentation.
- I can reproduce this problem with stock/default settings file, theme, and sample content (as described in above “How to Get Help” sections of the documentation).
- I have searched the issues (including closed ones) and believe that this is not a duplicate.
- OS version and name: Windows 10
- Python version: Python 3.14.4
- Pelican version: 4.12.0
- Link to theme: Seafoam
- Links to plugins: (many)
- Link to your site: https://blog.minchin.ca/
- Link to your source: https://github.com/minchinweb/blog.minchin.ca
- Link to a Gist with the contents of your settings file: https://github.com/minchinweb/blog.minchin.ca/blob/pelican/pelicanconf.py
Issue
Upgrading from Pelican 4.11 to 4.12 throws a new warning:
[16:46:10] WARNING Unable to generate valid slug for Category "..". urlwrappers.py:46No other changes seem applicable.
Previously mentioned here __> https://github.com/getpelican/pelican/issues/3596#issuecomment-4315960125 (but not related to that issue).
This can be suppressed, add this to your settings:
CATEGORY_REGEX_SUBSTITUTIONS = [
(r"\.\.", "-dotdot-"), # needed to keep a "phantom" category from throwing an build error
# defaults
(r"[^\w\s-]", ""), # remove non-alphabetical/whitespace/"-" chars
(r"(?u)\A\s*", ""), # strip leading whitespace
(r"(?u)\s*\Z", ""), # strip trailing whitespace
(r"[-\s]+", "-"), # reduce multiple whitespace or "-" to single "-"
]Sites immediately before the above bypass:
Source: getpelican/pelican