File the remaining orphaned categories - #200
Merged
Merged
Conversation
The sports fix left 436 published articles matching no section or
subsection: still published, still reachable by direct link and by search,
on no section page. Same cause -- WordPress rolled a parent category up
over its child terms, and flat matching has nothing to roll up through --
and the startup warning has been naming them since the last deploy.
Filed by what the articles are:
Entertainment Style and its features (306 articles), TV, Exhibits,
Reel2Reel, Features, and the reviews columns. Style is
culture coverage, not opinion writing, so it goes here
rather than under Opinion's Lifestyle.
Opinion Editorial (103), Letters to the Editor, Commentary --
the section's own voice, filed under neither.
Columns Podcasts (75) and the recurring shows. Columns is where
bylined series live.
Comics&Puzzles Word Search.
Science & Tech Technically Speaking.
News Paid Post. The weakest of these: it is not news, but an
advertiser paid for it to be visible and nothing fits
better.
"Mark and Jair Explain Sports" is the one to watch. It is a show, not a
sports article, and it was one of the 31 that unanchored matching wrongly
counted into Sports. Anchored patterns keep it out while the alias puts it
in Columns, and a test pins both halves.
TestNoCategoryIsAliasedToTwoSections is new: an alias claimed by two
sections would put one article on both section pages, which reads as a
duplicate rather than as a misconfiguration -- the same way the original
bug read as a normal section.
entertainment and science-tech already hold aliases, and the seed only
writes where the column IS NULL so it will not top them up. Those two rows
are updated directly on the live database; the map stays the source of
truth for a database built from scratch. The comment on it says so.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ssavutu
force-pushed
the
fix/sports-subsection-rollup
branch
from
August 7, 2026 04:10
de6991e to
c0f2ae9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-on to #199, which fixed the sports half of the same bug.
What's left
#199 left 436 published articles matching no section or subsection — still published, still reachable by direct link and by search, on no section page. Same cause: WordPress rolled a parent category up over its child terms, and flat matching has nothing to roll up through. The
ReportOrphanedArticleswarning added in #199 has been naming them at every boot since.The calls
Filed by what the articles actually are:
Two worth stating out loud:
The one to watch
"Mark and Jair Explain Sports"is a show, not a sports article — and it was one of the 31 articles that unanchored matching wrongly counted into Sports before the exact-match fix. Anchored patterns keep it out of Sports while the alias puts it in Columns.TestPodcastNamedForASectionStaysOutOfItpins both halves.TestNoCategoryIsAliasedToTwoSectionsis also new: an alias claimed by two sections would put one article on both section pages, which reads as a duplicate rather than as a misconfiguration — the same way the original bug read as a normal section.Needs a data edit too
entertainmentandscience-techalready hold aliases, andSeedDefaultCategoryAliasesonly writes where the column IS NULL — deliberately, so an editor's clear isn't resurrected on every restart. So those two rows will not be topped up by this merge and must be updated directly (SQL in the PR discussion, or the sections screen). The map stays the source of truth for a database built from scratch; the comment on it now says so.Without that edit, the Style family — 306 of the 436 — stays orphaned.
Testing
go build,go vet, full suite green. Expect the startup warning to drop from 436 to near zero once both the merge and the data edit are in.🤖 Generated with Claude Code