fix(EditContent): handle image duplication warnings when source has no storage bucket - #1969
Open
MrDirkelz wants to merge 3 commits into
Open
Conversation
johan-bell
approved these changes
Sep 1, 2026
johan-bell
left a comment
Collaborator
There was a problem hiding this comment.
Looks good — the warning fires exactly when the user asked to copy but the source has image files and no imageBucketId, and the buildContentDuplicate refactor preserves the clearing behaviour on the other paths. Two tiny nits, no need to block: the copied/skipped/none outcome variants are computed but unused (only noSourceBucket is consumed), and the PR body is empty — worth noting there that the trigger is a missing imageBucketId on older posts rather than expiry.
ivanslabbert
reviewed
Sep 1, 2026
ivanslabbert
left a comment
Contributor
There was a problem hiding this comment.
The fix does not resemble the issue in the linked ticket
MrDirkelz
force-pushed
the
1963-cms-api-image-not-duplicated-when-duplicating-an-expired-post
branch
from
September 1, 2026 10:44
8be3a41 to
66d1983
Compare
MrDirkelz
force-pushed
the
1963-cms-api-image-not-duplicated-when-duplicating-an-expired-post
branch
from
September 2, 2026 14:14
66d1983 to
0a83b07
Compare
…tion fix Provisional and expected to be superseded. ImageEditor cleared a parent's imageBucketId whenever the bucket was missing from the user's synced Storage list, which strips the reference the duplication path reads. The clearing is removed here and the condition only reported. The duplication path still trusts client-supplied bucket state, so this does not yet make the copy reliable. The server-side duplicateFrom resolution replaces the remaining warning path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Duplication asked the client to supply the bucket its image files live in, via the clone's own imageBucketId. A CMS that had lost or never synced that reference produced a duplicate with no image, and the API had no way to tell. ImageDto now carries duplicateFrom — the id of the parent being copied. The API reads that document's bucket and file collections itself and copies out of the source bucket into the duplicate's, so the result no longer depends on client state. duplicateFrom requires View access to the named document, since the server reads it on the caller's behalf. The duplicate boolean is still honoured for deployed clients that send it (ADR 0005), falling back to the same-bucket copy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.