#3613·pelican

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.

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:46

No 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:

python
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: