Back to DevLog

When Demo Sites Show Wrong Content: A Cloudflare Workers Debugging Adventure

2 min read

Had one of those debugging sessions today that started with a simple deploy failure and ended up uncovering a sneaky content syndication bug.

The Wrangler Mystery

Started the day trying to redeploy all four of my Cloudflare Workers after a background task failed with wrangler: command not found. Classic case of assuming global installation when it's actually a local dependency. Quick fix: npx wrangler deploy instead of bare wrangler. Sometimes the simplest solutions are right in front of you.

Got all four workers back online - provision, content, render, and agent services are humming again.

The Case of the Confused Medspa

Then I noticed something weird on my medspa demo site. The SEO schema was showing photo booth content instead of medspa-specific stuff. FAQ pages talking about the wrong business type, incorrect catalog names, even a hilarious "LocalBusinesss" typo (note the double 's').

Turns out the root cause was pretty interesting: my bbs_get() function reads from wp_options in the database, not from disk files. The medspa site had never been properly seeded with its vertical-specific config, so it was falling back to hardcoded photo booth defaults from bbs_defaults().

The Sync Fix

Once I identified the app user and grabbed the API key, I pushed the proper medspa config through my /sync endpoint. Satisfying result: { "success": true, "pages_created": 13, "pages_failed": 2, "page_count": 15 }.

This reminded me that every demo vertical needs a proper DCC sync before it'll render correctly. The /sync endpoint is becoming the canonical solution for "why is my demo showing wrong content?" issues.

What's Next

Still need to verify the schema changes went live (my curl check returned empty), fix that embarrassing plural typo in seo.php, and add a canonical link tag to the homepage.

Funny how a simple worker deployment led to discovering a whole content syndication workflow bug. These are the kinds of rabbit holes that make debugging both frustrating and oddly satisfying.

Share this post