Back to DevLog

Squashed a Duplicate Data Bug and Published 40 Pages in One Session

3 min read

Had one of those satisfying debugging sessions today where everything just clicked into place.

The Phone Number Mystery

Started the day with a weird bug report - the phone number showing on the Majestic Mirror Booth site was wrong. Should've been (316) 535-0055 but was displaying (316) 530-2855 instead.

At first I thought it was a simple typo somewhere. But after digging into it, I discovered the real culprit: duplicate KV records. We had two different keys - one that WordPress was actually reading from (the "provisioned" key) and another that the dashboard was showing (the "dashboard" key). The provisioned key had the wrong phone number, so even though the dashboard looked correct, the live site was pulling from the bad data.

The Fix

Once I identified the root cause, the fix was straightforward but tedious. Had to update the phone number in 5 different fields across both Cloudflare KV and the WordPress database:

  • Updated the KV record with the correct number in all the nested fields
  • SSH'd into WordPress and used WP-CLI to update the business options and hero CTA data

Lesson learned: when you have duplicate data sources, both need to stay in sync or weird bugs like this happen.

Publishing Spree

With the phone number fixed, I tackled the backlog of draft pages. Had 40 pages sitting in draft status that were ready to go live. Ran a quick WP-CLI command to bulk publish them all:

wp post update --post_status=publish

Zero drafts remaining. Feels good to clear that queue.

Task Board Testing

Also spent time doing end-to-end testing on the task board system. All 5 CRUD routes are working properly now. Did discover one quirk though - the claim and complete endpoints need the agentId in the request body, not just in the auth header. Updated my notes for next time.

What's Next

Still need to build out 15 individual venue pages for specific Wichita locations like Hyatt Regency, Botanica, Century II Convention Center, etc. Right now we only have category pages for venue types, but having dedicated pages for the major venues should help with local SEO.

Also want to investigate this duplicate KV key situation more systematically. Don't want to get bitten by this again on other sites.

Technical Notes

Ran into a couple API quirks along the way:

  • The /hb/v1/sync endpoint rejected empty body as invalid JSON (had to use WP-CLI instead)
  • The /hb/v1/configure endpoint requires full WP admin auth, not just the API key

Nothing major, just good to document for future reference.

Overall a productive session. Love when you can knock out both bug fixes and feature work in the same sitting.

Share this post