Problem
Settings → Search Defaults says "Pre-filled values across all search forms." Four pages never read those values and fall back to hardcoded 'France' / 'French' instead:
| page |
reads getSetting('default_location')? |
keyword-overview |
✅ yes |
keyword-ideas |
✅ yes |
competitors |
❌ hardcoded 'France' |
keyword-data |
❌ hardcoded 'France' / 'French' |
ranked-keywords |
❌ hardcoded 'France' |
serp |
❌ hardcoded 'France' |
Why it's worth fixing beyond tidiness
Save United States / English in Settings, open Keyword Data, type your keywords, hit Search — and it runs against France unless you happen to notice and retype the location. Nothing in the UI indicates the saved value was discarded.
Since these endpoints draw down a prepaid DataForSEO balance, the cost of not noticing is a paid call returning data for a market you didn't ask about. I did exactly this before spotting it.
It's also inconsistent in a way that's hard to self-diagnose: Keyword Overview honours the setting and Keyword Data doesn't, so the same saved default appears to work on one page and not the next.
Reproduce
- Settings → set Default Location
United States, Default Language English → Save
- Open
/dashboard/keyword-overview → shows United States / English ✅
- Open
/dashboard/keyword-data → shows France / French ❌
Fix
The pattern already exists in keyword-overview/page.tsx; the four pages just need it applied:
// before
const location = params.location ?? 'France';
const language = params.language ?? 'French';
// after
const location = params.location ?? getSetting('default_location') ?? 'France';
const language = params.language ?? getSetting('default_language') ?? 'French';
Keeping 'France' / 'French' as the final fallback means behaviour is unchanged for anyone who has never saved a default.
I have this working locally across all four pages — verified in the running app that all five now render United States with English as the selected option. Happy to open a PR if useful.
Problem
Settings → Search Defaults says "Pre-filled values across all search forms." Four pages never read those values and fall back to hardcoded
'France'/'French'instead:getSetting('default_location')?keyword-overviewkeyword-ideascompetitors'France'keyword-data'France'/'French'ranked-keywords'France'serp'France'Why it's worth fixing beyond tidiness
Save
United States/Englishin Settings, open Keyword Data, type your keywords, hit Search — and it runs against France unless you happen to notice and retype the location. Nothing in the UI indicates the saved value was discarded.Since these endpoints draw down a prepaid DataForSEO balance, the cost of not noticing is a paid call returning data for a market you didn't ask about. I did exactly this before spotting it.
It's also inconsistent in a way that's hard to self-diagnose: Keyword Overview honours the setting and Keyword Data doesn't, so the same saved default appears to work on one page and not the next.
Reproduce
United States, Default LanguageEnglish→ Save/dashboard/keyword-overview→ shows United States / English ✅/dashboard/keyword-data→ shows France / French ❌Fix
The pattern already exists in
keyword-overview/page.tsx; the four pages just need it applied:Keeping
'France'/'French'as the final fallback means behaviour is unchanged for anyone who has never saved a default.I have this working locally across all four pages — verified in the running app that all five now render
United StateswithEnglishas the selected option. Happy to open a PR if useful.