Conversation
…ed (PROD-1024) When prepareContentPayloads skips orphaned content items (missing model/container), the payloads array is shorter than contentBatch. Passing contentBatch to extractBatchResults caused every result after the first skip to be matched against the wrong source item, corrupting the source→target content ID mappings and producing wrong zone content IDs during page push. Fix: prepareContentPayloads now returns includedItems alongside payloads — only the non-skipped source items in 1:1 correspondence with what was sent to the API. extractBatchResults is called with includedItems instead of contentBatch.
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.
Bug
When
prepareContentPayloadsencounters orphaned content items (missing model or container), it skips them, producing apayloadsarray that is shorter than the originalcontentBatch. The downstream call toextractBatchResultswas still receiving the fullcontentBatch, causing every result after the first skipped item to be matched against the wrong source item.This corrupted the source→target content ID mappings and produced incorrect zone content IDs during page push.
Fix
prepareContentPayloadsnow returnsincludedItemsalongsidepayloads— representing only the non-skipped source items in 1:1 correspondence with the payloads actually sent to the API.extractBatchResultsis called withincludedItemsinstead ofcontentBatch, ensuring correct alignment between API results and source items.Changes
src/lib/pushers/content-pusher/content-batch-processor.ts: UpdatedprepareContentPayloadsto return{ payloads, includedItems }and updated the call site to passincludedItemstoextractBatchResults.Ticket
PROD-1024