Back to DevLog

Two Bugs, Three Deploys: Fixing Title Duplication and Platform-Wide SEO Issues

3 min read

Just wrapped up a health audit for majesticmirrorbooth.com after their DNS cutover, and found some interesting bugs that turned into a good learning experience.

The Title Duplication Mystery

First issue was pretty obvious once I spotted it - the homepage title was showing "Majestic Mirror Booth — Photo Booth Rentals in Wichita & Wichita, Andover, Derby, Newton". Notice that duplicate "Wichita"?

Turns out bbs_get_region() returns all cities including the primary city, but my page-home.php was prepending the primary city again before the region string. Classic case of not reading my own code carefully enough.

Fixed it by adding a $hph_region_suffix that filters out the primary city using array_filter and strcasecmp. Clean and simple.

The Bigger Problem: Snake Case vs Camel Case

The second bug was way more interesting (and embarrassing). Every single operator site was showing "The Photo Booth Guy" in their og:title, og:description, and JSON-LD schema blocks instead of their actual business name.

I was pulling my hair out until I realized the issue: my seo.php was using bbs_get('business.company_name', ...) (snake_case) but the DCC actually stores business.companyName (camelCase). Since bbs_get() does exact dot-notation lookup with no normalization, it was just returning empty and falling back to the default.

Had to update all 15 occurrences across the SEO file. This was a platform-wide issue affecting every operator site, so I deployed the fix to the golden booth template and the IV hydration site too.

The Deployment Dance

Ended up pushing fixes to three different apps:

  • dxwvpebsmw for majesticmirrorbooth.com (all fixes)
  • czkvnkbrmc for the golden booth template
  • avjjsfjyqf for the IV hydration dev site

Also cleaned up a stale hb_client_id that was pointing to the wrong KV record.

What I Learned

This camelCase vs snake_case thing is definitely something to watch out for. The bbs_get() function doesn't do any smart normalization - it expects exact matches. Going forward, any new operator site should provision cleanly from the badboothsites repo now that this is fixed.

I also created a reusable pattern for the region deduplication that can be applied anywhere we're appending region strings after city names.

Up Next

Clean session close with everything committed and deployed. Next up is either provisioning the PBG WordPress site or diving into that render worker schema audit. Also have a localStorage override bug in body-tracking.js that's been sitting in progress.

Sometimes the best debugging sessions are the ones where you find issues you didn't know existed.

Share this post