Repository navigation
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
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.
Summary
Backports the PHP fix from WordPress/gutenberg#85679 for WordPress/gutenberg#85595.
A non-hierarchical custom post type can support
page-attributesfor ordering without supporting parent-child relationships. Core currently registers its Parent DataForm field based only on that support flag, exposing an inappropriate Parent control. Require both hierarchy andpage-attributesbefore registering the field. Hierarchical types retain their Parent field; ordering, supports and persistence are unchanged.The support-only parent test is replaced with all four hierarchy/support combinations. The new data provider follows current trunk's static-provider convention, and the regression test links ticket #66428. Existing upstream test teardown cleanup is preserved. The PHP runtime file matches the Gutenberg implementation byte-for-byte. No legacy React component change or unrelated cleanup is included.
Testing instructions
hierarchical => falseandsupports => array( 'title', 'editor', 'page-attributes' ).hierarchical => true: Parent remains available. Withoutpage-attributessupport it should not be registered in either case.npm run test:php -- --group entity-fields, thennpm run test:php -- -c tests/phpunit/multisite.xml --group entity-fields. The new test istest_the_parent_field_requires_hierarchy_and_page_attributesintests/phpunit/tests/entity-fields/wpRegisterCoreFieldCollections.php.Validation
Revalidated on October 31, 2026 against Core trunk
518fcad26afd87e5422ddda0d95b6af15bea8057, with PHP 8.4.12, PHPUnit 9.6.38 and an isolated MariaDB 10.11.18 test database:page-attributes.entity-fieldsgroup including REST passed 125 tests / 458 assertions in single-site and 125 tests / 458 assertions in multisite.git diff --checkpassed.Suggested milestone: 7.2, subject to maintainer triage; no release assignment is claimed. The Gutenberg backport-changelog entry now links this Core PR: https://github.com/WordPress/gutenberg/blob/8d32edb4385222d532b22cf8d6bf940a96ca29ef/backport-changelog/7.2/15290.md.
CI follow-up
At head
28a3eeb6f41b2a4f80f884eb83a075535cd539eb, Core CI rebuilds the tracked PHP file from its older pinned Gutenberg build, restoring the support-only Parent condition. This causes the tracked-file build checks and the new regression case to fail. The companion Gutenberg fix must be included in Core's Gutenberg source pin/build for regeneration to preserve the guard. Exact build and PHPUnit log evidence is recorded at https://core.trac.wordpress.org/ticket/66428#comment:2. No tests or workflow checks were disabled.Trac ticket: https://core.trac.wordpress.org/ticket/66428
Use of AI Tools
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.