Where are you having the issue
Is the issue affecting one of the two elements below ?
Description
Seven sub-sets serve no card image at all, and none of them carries a logo or a symbol either. The image files are not missing from the CDN — they are served fine — but the API builds a URL the assets manifest does not know about, so the image field is dropped entirely. 340 cards are affected.
Reproduction
Fetching Entei V, one of the Galarian Gallery cards:
$ curl -s https://api.tcgdex.net/v2/fr/cards/swsh12.5gg-GG36 | jq '{id, name, set: .set.id, has_image: has("image"), image}'
{
"id": "swsh12.5gg-GG36",
"name": "Entei V",
"set": "swsh12.5gg",
"has_image": false,
"image": null
}
The image key is not null — it is absent from the payload, so a client cannot even tell the picture exists. The very same Pokémon in the parent set is served correctly:
$ curl -s https://api.tcgdex.net/v2/fr/cards/swsh12.5-021 | jq '{id, name, set: .set.id, has_image: has("image"), image}'
{
"id": "swsh12.5-021",
"name": "Entei",
"set": "swsh12.5",
"has_image": true,
"image": "https://assets.tcgdex.net/fr/swsh/swsh12.5/021"
}
At set level, nothing is served either:
$ curl -s https://api.tcgdex.net/v2/fr/sets/swsh12.5gg | jq '{id, logo, symbol, cards: (.cards|length), cards_with_image: ([.cards[]|select(has("image"))]|length)}'
{
"id": "swsh12.5gg",
"logo": null,
"symbol": null,
"cards": 70,
"cards_with_image": 0
}
Root cause
getCardPictures() resolves a card's picture against datas.json using the card's own set id:
https://github.com/tcgdex/cards-database/blob/master/server/compiler/utils/cardUtil.ts#L13-L17
const fileExists = Boolean(file[lang]?.[card.set.serie.id]?.[card.set.id]?.[cardId])
For swsh12.5gg-GG36 that reads fr.swsh["swsh12.5gg"]["GG36"]. But datas.json has no swsh12.5gg key at all — the 70 GG01…GG70 entries live under the parent set, swsh12.5. The lookup fails, and the card is emitted without image.
The assets themselves are perfectly reachable under the parent path:
https://assets.tcgdex.net/fr/swsh/swsh12.5gg/GG36/high.png -> 404
https://assets.tcgdex.net/fr/swsh/swsh12.5/GG36/high.png -> 200 ✅
setToSet() has the same problem for the set logo and symbol, which is why swsh12.5gg has neither:
https://github.com/tcgdex/cards-database/blob/master/server/compiler/utils/setUtil.ts#L56-L58
Scope — 340 cards across 7 sets
I checked every set of data/ against datas.json: 52 set ids are absent from the manifest. Most of those (McDonald's collections, trainer kits, …) simply have no assets anywhere, which is a different problem. These seven are the ones whose images do exist, filed under another set:
| Set (id in this repo) |
Id currently deployed |
Assets actually filed under |
Cards |
swsh4.5sv Shining Fates Shiny Vault |
swsh4.5sv |
swsh4.5 |
122 |
swsh12.5gg Crown Zenith Galarian Gallery |
swsh12.5gg |
swsh12.5 |
70 |
swsh9tg Brilliant Stars Trainer Gallery |
swsh9.5tg |
swsh9 |
30 |
swsh10tg Astral Radiance Trainer Gallery |
swsh10.5tg |
swsh10 |
30 |
swsh11tg Lost Origin Trainer Gallery |
swsh11.5tg |
swsh11 |
30 |
swsh12tg Silver Tempest Trainer Gallery |
swsh12.5tg |
swsh12 |
30 |
exu Unseen Forces Unown Collection |
exu |
ex10 (fr only) |
28 |
Every one of them returns 0/N cards with an image, and logo: null, symbol: null. Spot-checked on the CDN, each time the set's own path 404s while the parent path answers 200 — for example ex/exu/A → 404 and ex/ex10/A → 200.
exu has an extra wrinkle: its images exist only under fr/ex/ex10. en/ex/ex10/A is a 404, so English has no picture for these cards at all.
How each of the seven was verified
Card endpoints return has("image") == false — swsh4.5sv-SV062 (Lanssorien), swsh12.5gg-GG36 (Entei V), swsh9.5tg-TG16 (Mimiqui V), swsh10.5tg-TG16 (Galarian Articuno V), swsh11.5tg-TG16 (Pikachu V), swsh12.5tg-TG16 (Zeraora V), exu-A (Unown).
A 200 under the parent path is not on its own proof that the file is the right card, since TG16 exists under all four SWSH parents. What settles it is that no parent set contains those local ids itself: there is no TG* file in Brilliant Stars, Astral Radiance, Lost Origin or Silver Tempest, no GG* in Crown Zenith, no SV* in Shining Fates, and no letter-numbered card in Unseen Forces. Those manifest entries can only belong to the sub-set.
For the same reason, sub-sets whose local ids are plain numbers were excluded from the table even though they also serve no image: B2a (Paldean Wonders) and ex5.5 (Poké Card Creator Pack) have 001, 002… which collide with their parent's own cards, so nothing there is conclusive. Their manifest entry counts confirm it — B2 holds 235 entries for 234 cards plus a logo, leaving no room for B2a's 131. Those two belong with the ~44 sets that simply have no assets anywhere.
Note the parent mapping is not derivable from the id: swsh12.5gg → swsh12.5 keeps the .5, swsh9.5tg → swsh9 drops it, and exu → ex10 shares no prefix at all. Consumers cannot work around this client-side.
The gallery split (#1678, #1784) moved the data without the assets manifest following, but swsh4.5sv and exu predate those PRs — so this is a standing gap in how sub-sets are handled rather than fallout from a single change.
Possibly unrelated, but worth checking together
The deployed API still serves the pre-#1784 ids: /v2/fr/sets/swsh9tg returns 404 while /v2/fr/sets/swsh9.5tg still answers (and shows 0/30 images). The id rename appears not to have been deployed yet.
Two ways out
- Assets side — register the sub-set ids in
datas.json (moving or duplicating the files). Cleanest, but only maintainers can do it.
- Compiler side — give a set an optional "assets id" distinct from its own id, and fall back to it in the three lookups (card image, logo, symbol). Fixes all 340 cards without touching the CDN, since the files already answer 200 under the parent path.
Happy to open the PR for option 2 if that is the direction you want.
Related
Where are you having the issue
Is the issue affecting one of the two elements below ?
Description
Seven sub-sets serve no card image at all, and none of them carries a
logoor asymboleither. The image files are not missing from the CDN — they are served fine — but the API builds a URL the assets manifest does not know about, so theimagefield is dropped entirely. 340 cards are affected.Reproduction
Fetching Entei V, one of the Galarian Gallery cards:
The
imagekey is not null — it is absent from the payload, so a client cannot even tell the picture exists. The very same Pokémon in the parent set is served correctly:At set level, nothing is served either:
Root cause
getCardPictures()resolves a card's picture againstdatas.jsonusing the card's own set id:https://github.com/tcgdex/cards-database/blob/master/server/compiler/utils/cardUtil.ts#L13-L17
For
swsh12.5gg-GG36that readsfr.swsh["swsh12.5gg"]["GG36"]. Butdatas.jsonhas noswsh12.5ggkey at all — the 70GG01…GG70entries live under the parent set,swsh12.5. The lookup fails, and the card is emitted withoutimage.The assets themselves are perfectly reachable under the parent path:
setToSet()has the same problem for the set logo and symbol, which is whyswsh12.5gghas neither:https://github.com/tcgdex/cards-database/blob/master/server/compiler/utils/setUtil.ts#L56-L58
Scope — 340 cards across 7 sets
I checked every set of
data/againstdatas.json: 52 set ids are absent from the manifest. Most of those (McDonald's collections, trainer kits, …) simply have no assets anywhere, which is a different problem. These seven are the ones whose images do exist, filed under another set:swsh4.5svShining Fates Shiny Vaultswsh4.5svswsh4.5swsh12.5ggCrown Zenith Galarian Galleryswsh12.5ggswsh12.5swsh9tgBrilliant Stars Trainer Galleryswsh9.5tgswsh9swsh10tgAstral Radiance Trainer Galleryswsh10.5tgswsh10swsh11tgLost Origin Trainer Galleryswsh11.5tgswsh11swsh12tgSilver Tempest Trainer Galleryswsh12.5tgswsh12exuUnseen Forces Unown Collectionexuex10(fronly)Every one of them returns
0/Ncards with an image, andlogo: null,symbol: null. Spot-checked on the CDN, each time the set's own path 404s while the parent path answers 200 — for exampleex/exu/A→ 404 andex/ex10/A→ 200.exuhas an extra wrinkle: its images exist only underfr/ex/ex10.en/ex/ex10/Ais a 404, so English has no picture for these cards at all.How each of the seven was verified
Card endpoints return
has("image") == false—swsh4.5sv-SV062(Lanssorien),swsh12.5gg-GG36(Entei V),swsh9.5tg-TG16(Mimiqui V),swsh10.5tg-TG16(Galarian Articuno V),swsh11.5tg-TG16(Pikachu V),swsh12.5tg-TG16(Zeraora V),exu-A(Unown).A 200 under the parent path is not on its own proof that the file is the right card, since
TG16exists under all four SWSH parents. What settles it is that no parent set contains those local ids itself: there is noTG*file in Brilliant Stars, Astral Radiance, Lost Origin or Silver Tempest, noGG*in Crown Zenith, noSV*in Shining Fates, and no letter-numbered card in Unseen Forces. Those manifest entries can only belong to the sub-set.For the same reason, sub-sets whose local ids are plain numbers were excluded from the table even though they also serve no image:
B2a(Paldean Wonders) andex5.5(Poké Card Creator Pack) have001,002… which collide with their parent's own cards, so nothing there is conclusive. Their manifest entry counts confirm it —B2holds 235 entries for 234 cards plus alogo, leaving no room for B2a's 131. Those two belong with the ~44 sets that simply have no assets anywhere.Note the parent mapping is not derivable from the id:
swsh12.5gg→swsh12.5keeps the.5,swsh9.5tg→swsh9drops it, andexu→ex10shares no prefix at all. Consumers cannot work around this client-side.The gallery split (#1678, #1784) moved the data without the assets manifest following, but
swsh4.5svandexupredate those PRs — so this is a standing gap in how sub-sets are handled rather than fallout from a single change.Possibly unrelated, but worth checking together
The deployed API still serves the pre-#1784 ids:
/v2/fr/sets/swsh9tgreturns 404 while/v2/fr/sets/swsh9.5tgstill answers (and shows 0/30 images). The id rename appears not to have been deployed yet.Two ways out
datas.json(moving or duplicating the files). Cleanest, but only maintainers can do it.Happy to open the PR for option 2 if that is the direction you want.
Related
symbolpath is missing while the localized one exists.