Description
When using emdash seed to populate content with "status": "published", entries are created without a liveRevisionId. This causes the admin UI to show "Save & Publish" instead of "Unpublish" for already-published content, as the editor checks for the presence of liveRevisionId to determine publication state.
Steps to reproduce
- Create a
seed.json with published content entries:
{
"content": {
"posts": [
{
"id": "hello-world",
"slug": "hello-world",
"status": "published",
"data": {
"title": "Hello World",
"content": [{ "_type": "block", "style": "normal", "children": [{ "_type": "span", "text": "Hello" }] }]
}
}
]
}
}
- Run
emdash seed seed.json
- Open admin at
/_emdash/admin and navigate to the seeded entry
- Observe the action button shows "Save & Publish" despite
status: "published"
Expected behavior
Seeded entries with "status": "published" should have a liveRevisionId created, so the admin UI correctly shows the entry as published with an "Unpublish" option.
Actual behavior
liveRevisionId is null. The admin treats the entry as unpublished. Manually saving each entry from the admin UI creates the revision and fixes the state.
Environment
- emdash: 0.5.0
- astro: 5.18.1
- adapter: @astrojs/node (standalone)
- database: SQLite
Description
When using
emdash seedto populate content with"status": "published", entries are created without aliveRevisionId. This causes the admin UI to show "Save & Publish" instead of "Unpublish" for already-published content, as the editor checks for the presence ofliveRevisionIdto determine publication state.Steps to reproduce
seed.jsonwith published content entries:{ "content": { "posts": [ { "id": "hello-world", "slug": "hello-world", "status": "published", "data": { "title": "Hello World", "content": [{ "_type": "block", "style": "normal", "children": [{ "_type": "span", "text": "Hello" }] }] } } ] } }emdash seed seed.json/_emdash/adminand navigate to the seeded entrystatus: "published"Expected behavior
Seeded entries with
"status": "published"should have aliveRevisionIdcreated, so the admin UI correctly shows the entry as published with an "Unpublish" option.Actual behavior
liveRevisionIdisnull. The admin treats the entry as unpublished. Manually saving each entry from the admin UI creates the revision and fixes the state.Environment