Skip to content

Recover the /author URLs that WordPress and the import left broken - #88

Merged
ssavutu merged 1 commit into
mainfrom
fix/author-taxonomy-urls
Aug 8, 2026
Merged

Recover the /author URLs that WordPress and the import left broken#88
ssavutu merged 1 commit into
mainfrom
fix/author-taxonomy-urls

Conversation

@ssavutu

@ssavutu ssavutu commented Aug 8, 2026

Copy link
Copy Markdown
Member

Follow-on from #86, found in the same logs. 68 distinct slugs were 404ing on /v1/authors/<slug>/articles. They turned out to be two unrelated problems.

1. Category archives under /author (31 slugs)

WordPress gave categories an author-shaped archive, so /author/crossword, /author/movies and /author/womens-basketball are indexed and still linked. This site serves all of that content — just at /<slug>.

25 are subsections (crossword, movies, sudoku, puzzles, satire, the-drawing-board, womens-basketball, philly-sports, …) and 6 are sections (news, opinion, sports, columns, entertainment, graduation). These now 301 to the page holding their content, via the cached taxonomy.

2. Real people filed under a different slug (7 slugs)

The import derives an author's slug from the WordPress login, and the logins don't agree with the names the site links by. Four distinct shapes are live:

URL that is linked slug the CMS holds why
ryan-keating rkeating abbreviated login
nayab-iqbal by-nayab-iqbal byline text used as the login
sanjana-bandi-2 sanjana-bandi WordPress duplicate-account suffix
stefan-kusmirek stefan-kusmirek-dev-thetriangle-org email used as the login

Ryan Keating has 59 articles and his author page was unreachable from every URL that names him.

No pattern covers all four, and the next import will invent a fifth. So this matches on the display name, which is the one thing they have in common — the CMS holds the right name in every case, only the slug is wrong. It also keeps working after the ETL fix changes the slugs.

src/utils/authorIndex.ts builds that index from a paged /v1/authors sweep and caches it in process, on the taxonomyStore pattern: same TTL-plus-stale-fallback, same single-flight dedupe, same refusal to cache an empty result (an index with no authors would answer "no such person" for everyone). 875 authors, ~114 KB.

The ETL half is DrexelTriangle/wordpress-etl#63, but that only lands on a reseed and covers only the by- shape. These are live 404s now, so the recovery lives here.

Cost

Both checks run only after the author lookup has already missed, so a page that resolves pays nothing. Both refuse to act on an indefinite answer — getSlugKind returns unavailable and resolveAuthorSlug returns null when the CMS can't be read, leaving the 404 in place rather than inventing a redirect during a blip that then caches.

What still 404s, correctly

30 slugs are WordPress categories the CMS has no row for (music-entertainment, restaurant-reviews, exhibits, wordsearch) or WordPress handles with no author record (beeboop, abuckingham, carter, kasey-shamis-temp). Dead on both sides.

Verification

astro check: 0 errors. Dev server against the live CMS:

/author/ryan-keating         301 → /author/rkeating
/author/nayab-iqbal          301 → /author/by-nayab-iqbal
/author/sanjana-bandi-2      301 → /author/sanjana-bandi
/author/james-biernat-2      301 → /author/james-biernat
/author/michael-duffin-2     301 → /author/michael-duffin
/author/suhani-dheer-2       301 → /author/suhani-dheer
/author/stefan-kusmirek      301 → /author/stefan-kusmirek-dev-thetriangle-org
/author/crossword            301 → /crossword
/author/news                 301 → /news

/author/rkeating                 200   (real slug, untouched)
/author/sanjana-bandi            200
/author/erik-heyman-meltzer-870  200   (real numeric-suffix slug, not stripped)
/author/beeboop                  404   (genuinely unknown)
/author/abuckingham              404

🤖 Generated with Claude Code

WordPress gave categories an author-shaped archive, so /author/crossword,
/author/movies and /author/womens-basketball are indexed and still linked.
This site serves all of that content, just at /<slug>, and the author route
answered 404 for every one of them.

31 of the 68 distinct slugs that 404'd on this route name a section or a
subsection: 25 subsections (crossword, movies, sudoku, puzzles, satire,
the-drawing-board, womens-basketball and the rest) and 6 sections (news,
opinion, sports, columns, entertainment, graduation). Those now redirect to
the page that holds their content.

The check runs only after the author lookup misses, so a real author's page
costs nothing extra, and it reads the cached taxonomy rather than the CMS.
Only a definite answer redirects: getSlugKind reports 'unavailable' when the
taxonomy could not be read, and sending a real author's page to /<slug>
during a blip would turn a brief outage into a confidently wrong 301 that
caches.

The remaining 37 slugs are a separate problem and are left alone here. Some
are WordPress categories the CMS has no row for at all; the rest are real
people whose slugs the import got wrong -- four carry a "by-" prefix taken
from the WordPress login, and four more are WordPress's -2 duplicate-account
suffix. That is an ETL defect, not a routing one.

Verified against the live CMS: /author/crossword, /author/movies and
/author/news redirect; /author/sanjana-bandi and /author/by-nayab-iqbal still
serve; /author/ryan-keating still 404s.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ssavutu
ssavutu merged commit c374c70 into main Aug 8, 2026
1 check passed
@ssavutu ssavutu changed the title Send the WordPress category archives that live under /author somewhere Recover the /author URLs that WordPress and the import left broken Aug 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant