Alright, let’s slow this down and troubleshoot it ...
Erstellt am: 3. Dezember 2025
Beantwortet mit GPT-5.1 Thinking von Chat01
Erstellt am: 3. Dezember 2025
Beantwortet mit GPT-5.1 Thinking von Chat01
Alright, let’s slow this down and troubleshoot it clean-and-simple, because this sounds like a data-mapping issue — not a server problem.
When a field flips from “N/A” → “Ask Dealer” → blank, that means your frontend is still not actually getting the mileage field from the API.
👉 The real issue:
Your Base44 query isn’t requesting the mileage or specs/equipment fields, or the API isn’t returning them because of how the entity is structured.
Most dealer feeds map mileage under one of these:
• mileage
• miles
• odometer
• specs.odometer
• specs.mileage
• specs.miles
• vehicle_details.mileage
Yep, this absolutely smells like a data-shape / mapping issue, not infra.
Let’s walk it through step-by-step and get you to something you can hand to a dev and fix.
For a VIN / listing where you see the flip (N/A → Ask Dealer → blank):
You’re looking for any of these keys/paths:
mileagemilesodometerspecs.odometerspecs.mileagespecs.milesvehicle_details.mileageIf none of these exist in the payload, then:
If one of them does exist and has a value, but the UI shows “N/A / Ask Dealer / blank”, then the bug is 100% in your mapping/frontend logic.
Whichever backend layer is calling Base44 (GraphQL, REST, whatever) needs to explicitly request the mileage/specs fields.
Example (pseudo-GraphQL style):
graphqlvehicle(id: "…") { id vin price # Make sure these are included: mileage miles odometer specs { mileage miles odometer } vehicle_details { mileage } }
Then re-test that the response actually contains those fields for a known listing.
Instead of your frontend guessing which field to use, normalize it once in your API layer.
Pseudo-TS/JS:
tsfunction normalizeMileage(raw: any): number | null { const candidates = [ raw.mileage, raw.miles, raw.odometer, raw.specs?.odometer, raw.specs?.mileage, raw.specs?.miles, raw.vehicle_details?.mileage, ]; const value = candidates.find(v => v !== undefined && v !== null && v !== ''); const numeric = typeof value === 'string' ? parseInt(value.replace(/[^\d]/g, ''), 10) : value; return Number.isFinite(numeric) ? numeric : null; }
Then return something like:
json{ "mileage": 43210 }
…so the frontend doesn’t care where it originally came from.
Your current behavior:
"N/A""Ask Dealer""" (blank)That usually means you have multiple conditional passes acting on the same field (maybe different components or hooks). You want a single, simple rule:
tsconst mileage = listing.mileage; // already normalized by backend const mileageLabel = mileage == null ? 'Ask Dealer' // or 'N/A', pick ONE : `${mileage.toLocaleString()} miles`;
No multiple fallbacks, no flipping state.
You can literally hand this to the dev:
mileage, miles, odometerspecs.mileage, specs.miles, specs.odometervehicle_details.mileagemileage field.normalizedMileage and use a single fallback rule.If you paste one full sample JSON response for a “broken” listing, I can show you exactly how I’d map it and what your normalized object should look like.