Bug
When a client tries to edit/update a post that is already finalized (published, publishing, partially_published, or failed), the API and MCP return a broken error message: the raw translation key instead of the human-readable string.
Observed
{ "message": "posts.cannot_edit_finalized" }
Expected (English)
{ "message": "This post has already been processed and cannot be re-published. Duplicate it to try again." }
Root cause
App\Support\PostStatusRules::editBlockedMessage() uses:
private const EDIT_BLOCKED_MESSAGE_KEY = 'posts.cannot_edit_finalized';
But the string only exists under posts.flash.cannot_edit_finalized in lang/*/posts.php.
- Web UI already uses the correct key:
__('posts.flash.cannot_edit_finalized') (e.g. PostController).
- API (
Api\PostController) and MCP (UpdatePostTool, PublishPostTool) go through PostStatusRules::editBlockedMessage() and hit the wrong key.
Verified locally:
| Call |
Result |
__('posts.cannot_edit_finalized') |
posts.cannot_edit_finalized (missing) |
__('posts.flash.cannot_edit_finalized') |
Correct English copy |
PostStatusRules::editBlockedMessage() |
Raw key |
Suggested fix
Either:
- Change
EDIT_BLOCKED_MESSAGE_KEY to posts.flash.cannot_edit_finalized, or
- Add a top-level
posts.cannot_edit_finalized key (and keep flash as an alias), so API/MCP and flash stay in sync.
Also update any MCP/API tests that assert __('posts.cannot_edit_finalized') so they assert the resolved human string (or the corrected key).
Affected surfaces
PUT /api/posts/{post} when the post is finalized
- MCP
update-post-tool / publish-post-tool when the post is finalized
Bug
When a client tries to edit/update a post that is already finalized (
published,publishing,partially_published, orfailed), the API and MCP return a broken error message: the raw translation key instead of the human-readable string.Observed
{ "message": "posts.cannot_edit_finalized" }Expected (English)
{ "message": "This post has already been processed and cannot be re-published. Duplicate it to try again." }Root cause
App\Support\PostStatusRules::editBlockedMessage()uses:But the string only exists under
posts.flash.cannot_edit_finalizedinlang/*/posts.php.__('posts.flash.cannot_edit_finalized')(e.g.PostController).Api\PostController) and MCP (UpdatePostTool,PublishPostTool) go throughPostStatusRules::editBlockedMessage()and hit the wrong key.Verified locally:
__('posts.cannot_edit_finalized')posts.cannot_edit_finalized(missing)__('posts.flash.cannot_edit_finalized')PostStatusRules::editBlockedMessage()Suggested fix
Either:
EDIT_BLOCKED_MESSAGE_KEYtoposts.flash.cannot_edit_finalized, orposts.cannot_edit_finalizedkey (and keep flash as an alias), so API/MCP and flash stay in sync.Also update any MCP/API tests that assert
__('posts.cannot_edit_finalized')so they assert the resolved human string (or the corrected key).Affected surfaces
PUT /api/posts/{post}when the post is finalizedupdate-post-tool/publish-post-toolwhen the post is finalized