Playlist with a URL item cannot be saved a second time (media_id "") #302
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#302
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by the product owner on the campus test server (GRI-2051, 2026-11-17 12:25 UTC).
What happens
A playlist that holds a URL item can be saved once. After that, every further Save playlist fails with:
Playlists with only page/file/image/video items save fine.
Cause (read in
devd1a9bcb)The URL item does not survive the round trip through the panel.
kind = "url", theurl, and nomedia_id(crates/server/src/playlists/handlers.rs:1197).itemFromWire(frontend-web/src/api/httpPlaylistsApi.ts:98) turns the missing id intomediaId = '', and keeps neitherkindnorurlon thePlaylistItem.replaceItems(httpPlaylistsApi.ts:~178) looks the item up in the library bymediaId.''is not found, sokindfalls back to'image'and the panel sends{ kind: "image", media_id: "" }. The server refuses the empty UUID.So the first save works (the item still came from the library), and every save after a reload breaks.
Fix
kindandurl(andpagewhere present) on the panel'sPlaylistItemwhen it is read from the server.replaceItems, send a URL item from its ownkind/url; use the library lookup only for items that have amedia_id. Never sendmedia_id: "", and never guess'image'for an item the library does not know — fail loudly instead.document_pageread back from the server must also keep itspage.Acceptance
{kind:"url", url:...}and nomedia_id, and the server answers 200.Fix #306 merged into dev at
acdbda2. Stays open until saving a playlist with a URL item twice is verified on the campus test server.dev
aeab4f8(includes #306) is deployed on the campus test server 10.4.80.205 since 15:14 UTC. Open until a playlist with a URL item is saved twice in the panel there.Fixed and merged into dev via PR #306 (
acdbda2c). The fix keeps kind/url/page on round-tripped playlist items and avoids sending media_id:"" or guessing kind=image for library-less items; two tests added in httpPlaylistsApi.test.ts cover the resave path. Verified: PR #306 CI passed on all gates relevant to this change (clippy, cargo test, frontend-web, cargo fmt, repo boundary, pre-push hook); the only pre-existing red (cargo-deny chrono advisory, GRI-2178) was fixed separately in #308 and merged first. Closing.Verified by the product owner on the campus test server (dev
aeab4f8, 2026-11-17 15:15 UTC): a playlist with a URL item saves again without error. Closing.