Fix --only flag: respect all post types#250
Open
jessedyck wants to merge 2 commits into
Open
Conversation
When --only is used with explicit post IDs, the query still applied the default post_type constraint (['post', 'page']), so any IDs belonging to custom post types were dropped from the migration queue without warning. Set post_type='any' inside the --only branch so all explicitly supplied IDs are respected regardless of their post type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jessedyck
force-pushed
the
fix/only-flag-post-type-pagination
branch
from
July 18, 2026 11:24
c6c742b to
52671e6
Compare
Covers the confirmed bug (custom post type IDs silently dropped when using --only), the expected filtering to only the specified IDs, and that the default query (without --only) excludes custom post types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
|
Tests verified locally via |
jessedyck
marked this pull request as ready for review
July 18, 2026 12:00
jessedyck
requested review from
dkotter,
dsawardekar and
jeffpaul
as code owners
July 18, 2026 12:00
dkotter
requested review from
peterwilsoncc
and removed request for
dkotter,
dsawardekar and
jeffpaul
July 20, 2026 16:28
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.
Fixes #251.
Problem
When using
--only=<ids>, the query still applied the defaultpost_type => ["post", "page"]constraint. Any IDs belonging to custom post types were silently dropped from the migration queue.Fix
Set
post_type = "any"inside the--onlybranch so all explicitly supplied IDs are included regardless of their post type.Test
🤖 Generated with Claude Code