Repository navigation
Conversation
The publish check read repo:scene7FileStatus, which only Dynamic Media sets. On author repositories without Dynamic Media the property is missing, so every asset passed and editors inserted publish URLs that return 404. The asset selector payload carries aem:published, which reflects only the publish tier. Refuse an asset when it is false and keep accepting it when it is missing. Replace the scene7 check instead of combining it, since the inserted URL does not depend on Dynamic Media sync. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
wouldn't this change break the whole dynamic media support? There you can have images on delivery tier without ever having to publish the image by just changing the approval status which will lead to the updated s7 properties |
This branch has not been deployed
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.
Problem
This fixes a production bug in every editor that inserts AEM Assets. Today, on every site with an author repository and no Dynamic Media, authors can insert an asset that was never published, was unpublished, or is only on preview. The editor accepts it without a warning and stores a publish URL that returns 404. Authors see a broken image in the editor, and once the page is previewed and published, visitors see it too. Nothing points to the cause, so the error is easy to miss until the page is live.
The publish check in
isPublishedreadrepo:scene7FileStatus. That is a Dynamic Media sync status. Without Dynamic Media it is never set, and a missing status counted as published.Change
isPublishednow readsaem:publishedfrom the selector payload.falseis refused with the existingPUBLISH_ERROR_MSG.trueor a missing flag is inserted, which keeps today's behaviour for repositories that don't send it.getScene7PublishStatusis replaced bygetPublishedFlag. The scene7 check is dropped, not combined, because the inserted URL is a publish tier URL and does not depend on Dynamic Media sync.How
aem:publishedbehavesI compared real selector payloads on an author repository without Dynamic Media.
aem:publishedtruefalsefalsefalserepo:scene7FileStatuswas missing in every case.Filtering unpublished assets out of the picker, like adobe/da-live#1223, is not possible. The selector ignores filters on
aem:publishedand on the replication properties, while a filter ondc:formatworks.Testing
Manual check in the classic editor or canvas and this branch served locally. Unpublished and preview-only images show the publish error. A published image is inserted.
Out of scope
Images that are unpublished after insertion still show as broken. A "Preview unavailable" state in canvas and the structured content image field should be a separate follow-up.