Repository navigation
Submit related content selected on the Bulk Submit page (WP-1027) - #640
Open
achursin-smartling wants to merge 1 commit into
Open
achursin-smartling wants to merge 1 commit into
achursin-smartling wants to merge 1 commit into
Conversation
The bulk branch of createSubmissions() ignored the relations sent by the job wizard since WP-973, so e.g. featured images were never submitted. Also fix menu item queue ids being dropped by the key-based array union. Co-Authored-By: Claude Opus 5.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.
Problem
Since WP-973 (5.1.0) the Bulk Submit job wizard loads related content (featured images, terms, …) for the selected items and sends the user's selection as
relations. The backend ignored it: inContentRelationsDiscoveryService::createSubmissions, theisBulk()branch calledbulkUpload()with only the selected IDs and returned. Related content selected on Bulk Submit was never submitted, so for example featured images stayed unmapped on the target site.Fix
relations, per target blog, throughbulkUpload()so existing submissions are reused. They are queued in the same batch as the selected items. Related IDs that are themselves bulk-selected items of the same type are skipped.enqueueBulk()(no behavior change), so the main items and related items go into one batch.bulkUpload()merged the menu item queue IDs withArrayHelper::add(), which unions by key ([1] + [2, 3, 4]gives[1, 3, 4]), so some menu item submissions were stored but never queued. It now usesarray_merge.readme.txt, and version bumped to 5.8.3 (composer.json,smartling-connector.php,readme.txtstable tag).Tests
Added
ContentRelationsDiscoveryServiceTest::testBulkSubmitHandlerSubmitsSelectedRelations. Not run locally (no PHP environment available), please rely on CI.Jira: WP-1027
🤖 Generated with Claude Code