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:
|
Its definition still described the support-only condition. Matches WordPress/gutenberg#85679. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8ae3bd2 to
e89ad4d
Compare
This updates the pinned commit hash of the Gutenberg repository from `efd7722f89ebb8abfc3607fffdd86f5e34afbd9c` to `91e24b4c4d64796704663e88fae1459882635041`. It brings in the JavaScript part of hiding the parent controls for non-hierarchical post types, and makes the built `core-fields` files match the PHP changes of this branch. A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@efd7722...91e24b4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
These changes require pulling code from Gutenberg (built files). I've pushed a1deb93 so that CI jobs gives the true final state. This is ready to land, in my view, but I understand the release leads (@Mamaduka @peterwilsoncc) may want to time this package change differently. I'm happy to help, just wanted to bring this to your attention. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| }, | ||
| "gutenberg": { | ||
| "sha": "efd7722f89ebb8abfc3607fffdd86f5e34afbd9c", | ||
| "sha": "91e24b4c4d64796704663e88fae1459882635041", |
There was a problem hiding this comment.
The gutenberg hash is updated during the package update. Should the gutenberg hash (and automatic changes derived from it) be removed, leaving only the php change (a test file) on this PR? That we could commit before the pakcage upgrade would that work and the tests still pass @oandregal @drewmt?
There was a problem hiding this comment.
Yeah, I mentioned this below. No, tests wouldn't pass and I pushed to verify they do with these changes.
|
This is also blocking #16187, which includes automatically synced items, but I think it is missing the manual Unit Test sync part. I'll handle this in the main sync commit. |
Parent field now requires hierarchical post type. See WordPress#15290. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing in favor of #16187. |
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.Update
Adds the docblock change to
post_type_supports/parent/field.phpfrom WordPress/gutenberg#85679, so both tracked PHP files match the Gutenberg implementation. That PR also stops the parent field's JavaScript edit from requiring a viewable post type, so hierarchical post types withpublic => falseno longer get an empty Parent popover. That part is JavaScript built from the Gutenberg package and has no tracked file in Core; it arrives with the Gutenberg source pin.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.