Problem
Applying the Franchise Collections or All Defaults template bundle creates a "TMDB Franchise" collection with no TMDB collection ID. The template's description and the sync error both tell the admin to "edit the collection's source config", but the web collection editor can't change a franchise collection's source. From the web app, the collection can only be left empty or deleted. Every admin who applies All Defaults ends up with one.
The placeholder ships with collection_id 0 and no sync schedule. Bundle apply skips its first sync and reports it as created_sync_skipped_unconfigured, so the collection starts empty. A manual sync, or any schedule the admin adds, fails with "TMDB franchise template requires a collection_id — edit the collection's source config and supply a real TMDB collection ID".
For a TMDB collection whose source mode is tmdb_collection, the editor offers Libraries, Title, Description, Poster, Backdrop, Default Sort, and Sync Schedule. In place of source fields it shows: "This collection follows a TMDB franchise or discover filter from a template. Its source can't be changed here; saving keeps it as it is." Only a direct PATCH /api/v2/admin/collections/{id} with a new source_config can set the ID.
I found this by reading the code while auditing the docs for #1635. I didn't reproduce it on a running server.
Options
- Add a TMDB Collection ID field to the editor for
tmdb_collection sources, and change the sync error to point at it.
- Or ask for the ID when the bundle is applied, and skip creating the placeholder when none is given.
- Or remove the placeholder from the Franchise Collections bundle, and so from All Defaults. That also means dropping it from the catalog or relaxing
TestBundleOnlyTemplatesAreReachableFromBundles, which requires every tmdb_collection template to be in a bundle.
Technical notes
- Template:
internal/collections/templates/builtin.go:1631 (CollectionID: 0, DefaultSyncSchedule: ""). Bundle membership: builtin.go:1790. withAllDefaultsBundle (builtin.go:1795) adds it to all_defaults.
- Apply skips the first sync:
templateBundleTemplateCanInitialSync, internal/api/handlers/library_collections.go:1681; the skip reason is set at library_collections.go:1564.
- Sync failure:
validateTMDBFranchiseConfig, internal/catalog/library_collection_service.go:522, called from syncTMDBFranchiseCollection at line 537.
- Editor:
tmdbSourceKindOf returns "other" for any mode other than tmdb_list, tmdb_preset, or empty (web/src/pages/adminCollectionsShared.tsx:280). CollectionEditForm then sends the stored source_config back unchanged (adminCollectionsShared.tsx:1637) and shows the note at adminCollectionsShared.tsx:1866. The editable fields start at adminCollectionsShared.tsx:1752.
- The API accepts a new source:
AdminCollectionUpdate.SourceConfig, internal/apiv2/admin_collection_types.go:90, passed through by updateAdminCollection (internal/api/handlers/admin_collections_service.go:273); validateAdminCollectionSourceUpdate (line 312) only restricts Trakt and TMDB list sources.
- Tests:
TestPhase3FranchiseTemplatesUseExpectedBands requires the placeholder with ID 0; TestRegisterAcceptsPlaceholderTMDBCollection covers validation.
AI disclosure
- Harness: T3 Code (Claude Code agent harness)
- Tool(s): Claude Code, GitHub CLI
- Model(s): claude-opus-5-5
- Involvement: AI-assisted; filed at the maintainer's request
- Adversarial review: n/a
Problem
Applying the Franchise Collections or All Defaults template bundle creates a "TMDB Franchise" collection with no TMDB collection ID. The template's description and the sync error both tell the admin to "edit the collection's source config", but the web collection editor can't change a franchise collection's source. From the web app, the collection can only be left empty or deleted. Every admin who applies All Defaults ends up with one.
The placeholder ships with
collection_id0 and no sync schedule. Bundle apply skips its first sync and reports it ascreated_sync_skipped_unconfigured, so the collection starts empty. A manual sync, or any schedule the admin adds, fails with "TMDB franchise template requires a collection_id — edit the collection's source config and supply a real TMDB collection ID".For a TMDB collection whose source mode is
tmdb_collection, the editor offers Libraries, Title, Description, Poster, Backdrop, Default Sort, and Sync Schedule. In place of source fields it shows: "This collection follows a TMDB franchise or discover filter from a template. Its source can't be changed here; saving keeps it as it is." Only a directPATCH /api/v2/admin/collections/{id}with a newsource_configcan set the ID.I found this by reading the code while auditing the docs for #1635. I didn't reproduce it on a running server.
Options
tmdb_collectionsources, and change the sync error to point at it.TestBundleOnlyTemplatesAreReachableFromBundles, which requires everytmdb_collectiontemplate to be in a bundle.Technical notes
internal/collections/templates/builtin.go:1631(CollectionID: 0,DefaultSyncSchedule: ""). Bundle membership:builtin.go:1790.withAllDefaultsBundle(builtin.go:1795) adds it toall_defaults.templateBundleTemplateCanInitialSync,internal/api/handlers/library_collections.go:1681; the skip reason is set atlibrary_collections.go:1564.validateTMDBFranchiseConfig,internal/catalog/library_collection_service.go:522, called fromsyncTMDBFranchiseCollectionat line 537.tmdbSourceKindOfreturns"other"for any mode other thantmdb_list,tmdb_preset, or empty (web/src/pages/adminCollectionsShared.tsx:280).CollectionEditFormthen sends the storedsource_configback unchanged (adminCollectionsShared.tsx:1637) and shows the note atadminCollectionsShared.tsx:1866. The editable fields start atadminCollectionsShared.tsx:1752.AdminCollectionUpdate.SourceConfig,internal/apiv2/admin_collection_types.go:90, passed through byupdateAdminCollection(internal/api/handlers/admin_collections_service.go:273);validateAdminCollectionSourceUpdate(line 312) only restricts Trakt and TMDB list sources.TestPhase3FranchiseTemplatesUseExpectedBandsrequires the placeholder with ID 0;TestRegisterAcceptsPlaceholderTMDBCollectioncovers validation.AI disclosure