Skip to content

Entity Actions: Remove the route-collision check, as in core - #87165

Merged
jorgefilipecosta merged 1 commit into
trunkfrom
fix/entity-actions-route-collision-sync
Nov 20, 2026
Merged

jorgefilipecosta merged 1 commit into
trunkfrom
fix/entity-actions-route-collision-sync

Conversation

@priethor

Copy link
Copy Markdown
Contributor

What

Fixes the Tests_REST_Entity_Actions_Controller::test_the_route_of_a_taxonomy_with_the_same_base_is_kept PHPUnit failure on trunk (run) by syncing core 65725 (WordPress/wordpress-develop#16067).

Core no longer skips the /wp/v2/entity-actions route when a post type or taxonomy uses entity-actions as its REST base, so its controller registers the route anyway, and our test, which expected both controllers to skip it, finds an extra handler. This removes the same check from the 7.2 compat controller, along with its test, so the plugin behaves like core.

Testing Instructions

Not applicable.


I used Claude to help implement these changes. I guided the work, then tested and reviewed the result.

@priethor priethor added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core labels Nov 20, 2026
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: priethor <priethor@git.wordpress.org>
Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 58fdff8 trunk % Change
timeToFirstByte 57.7 ms +11.87% -4.77% 58.45 ms +6.16% -3.85% -1.28%
largestContentfulPaint 92 ms +4.35% -4.35% 90 ms +11.11% -6.67% 2.22%
lcpMinusTtfb 31.55 ms +26.78% -10.62% 30.75 ms +15.93% -4.88% 2.6%
wpBeforeTemplate 30.06 ms +8.48% -2.53% 30.47 ms +10.8% -3.15% -1.35%
wpTemplate 23.15 ms +3.97% -5.36% 23.09 ms +5.46% -2.69% 0.26%
wpTotal 53.89 ms +8.26% -5.1% 54.32 ms +6.46% -3.72% -0.79%
wpMemoryUsage 7.75 MB +0% -0% 7.72 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 58fdff8 trunk % Change
timeToFirstByte 49.05 ms +2.34% -3.67% 48.75 ms +1.74% -0.92% 0.62%
largestContentfulPaint 84 ms +7.14% -0% 84 ms +4.76% -0% 0%
lcpMinusTtfb 37.05 ms +3.1% -3.37% 35.85 ms +4.18% -1.26% 3.35%
wpBeforeTemplate 27.13 ms +7.78% -1.84% 27.59 ms +2.43% -1.59% -1.67%
wpTemplate 17.55 ms +3.99% -4.05% 17.93 ms +2.01% -5.3% -2.12%
wpTotal 45.49 ms +2.95% -3.63% 45.64 ms +1.56% -1.31% -0.33%
wpMemoryUsage 6.44 MB +0% -0% 6.40 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 58fdff8 trunk % Change
mediaProcessingJpeg 406.81 ms +0.51% -1.4% 405.18 ms +0.94% -0.18% 0.4%
mediaProcessingAvif 6170.82 ms +0.64% -0.31% 6190.48 ms +0.22% -0.06% -0.32%
mediaProcessingJpegToAvif 4248.5 ms +0.31% -0.5% 4248.18 ms +0.55% -0.05% 0.01%

media-upload

Metric 58fdff8 trunk % Change
jpegUploadProcessing 1995.19 ms +3.42% -0.3% 1990.84 ms +1.79% -0.42% 0.22%
pngUploadProcessing 292.84 ms +7.48% -5.59% 294.83 ms +2.02% -1.58% -0.67%
largeJpegUploadProcessing 1996.34 ms +0.94% -0.38% 1986.85 ms +0.36% -0.44% 0.48%
multipleImageUploadProcessing 2118.72 ms +1.69% -0.73% 2130.59 ms +1.19% -0.71% -0.56%

post-editor

Metric 58fdff8 trunk % Change
serverResponse 328.77 ms +4.53% -8.5% 321.76 ms +1.2% -9.98% 2.18%
firstPaint 340.36 ms +6.59% -7.69% 317.49 ms +12.96% -6.75% 7.2%
domContentLoaded 679.75 ms +5.55% -3.26% 632.74 ms +1.58% -0.95% 7.43%
loaded 680.59 ms +5.53% -3.25% 633.49 ms +1.58% -0.94% 7.44%
firstContentfulPaint 381.89 ms +10.91% -2.92% 364.2 ms +1.99% -1.53% 4.86%
firstBlock 1755.45 ms +2.29% -0.68% 1680.99 ms +1.21% -0.9% 4.43%
type 14.77 ms +7.38% -11.78% 13.63 ms +6.46% -6.82% 8.36%
typeWithoutInspector 13.89 ms +14.33% -10.15% 13.95 ms +2.72% -10.61% -0.43%
typeWithTopToolbar 18.64 ms +8.21% -4.99% 17.77 ms +9.79% -4.84% 4.9%
typeContainer 6.47 ms +14.99% -10.66% 6.48 ms +6.02% -10.49% -0.15%
focus 93.55 ms +5.76% -2.55% 89.98 ms +3.55% -2.19% 3.97%
firstFocus 209.88 ms +0% -0% 205.98 ms +0% -0% 1.89%
selectAll 312.23 ms +2.73% -1.72% 299.23 ms +0.81% -3.51% 4.34%
undo 24.25 ms +4.29% -6.52% 22.89 ms +6.95% -2.88% 5.94%
listViewOpen 60.6 ms +16.34% -6.9% 58.95 ms +7.63% -11.15% 2.8%
inserterOpen 31.89 ms +8.62% -7.4% 32.41 ms +5.09% -2.38% -1.6%
inserterHover 9.41 ms +10.95% -3.72% 9.16 ms +6% -5.79% 2.73%
inserterSearch 7.71 ms +6.23% -14.27% 6.59 ms +3.19% -2.58% 17%
loadPatterns 505.47 ms +1.73% -4.69% 491.93 ms +1.93% -1.29% 2.75%
wpTotal 320.16 ms +4.54% -8.79% 313.17 ms +1.24% -10.21% 2.23%
wpMemoryUsage 14.81 MB +0% -0% 14.77 MB +0% -0% 0.25%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 58fdff8 trunk % Change
serverResponse 483.89 ms +6.88% -3.31% 495.49 ms +1.22% -8.3% -2.34%
firstPaint 440.6 ms +11.24% -7.72% 491.49 ms +1.24% -17.62% -10.35%
domContentLoaded 888.21 ms +1.53% -1.82% 883.44 ms +3.74% -0.72% 0.54%
loaded 889.3 ms +1.57% -1.82% 884.85 ms +3.69% -0.76% 0.5%
firstContentfulPaint 490.46 ms +2.36% -2.62% 502.47 ms +1.6% -1.78% -2.39%
firstBlock 2726 ms +1.89% -0.23% 2750.61 ms +0.43% -1.27% -0.89%
type 18.84 ms +5.2% -9.13% 19.44 ms +3.09% -7.82% -3.09%
navigate 118.03 ms +4.43% -1.5% 124.09 ms +11.58% -4.25% -4.88%
loadPatterns 1567.5 ms +7.21% -2.57% 1572.51 ms +12.27% -7.5% -0.32%
loadPages 1029.91 ms +11.76% -3.34% 1028 ms +3.24% -1.07% 0.19%
wpTotal 474.07 ms +6.98% -3.41% 485.7 ms +1.2% -8.45% -2.39%
wpMemoryUsage 12.83 MB +0% -0% 12.80 MB +0% -0% 0.25%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

2cfdbaa Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

Should insert content using the inline inserter in /test/e2e/specs/widgets/editing-widgets.spec.js, passed after 1 failed attempt.

a navigation superseded by the traversal discharges to idle in /test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts, passed after 1 failed attempt.
SyntaxError: Unexpected token 'o', "not hydrated" is not valid JSON
    at readLog (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts:28:14)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts:47:24
    at waitForLogLength (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts:46:2)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigation-lifecycle.spec.ts:693:5

2cfdbaa Run

@jorgefilipecosta jorgefilipecosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jorgefilipecosta
jorgefilipecosta merged commit 8d0053a into trunk Nov 20, 2026
119 of 120 checks passed
@jorgefilipecosta
jorgefilipecosta deleted the fix/entity-actions-route-collision-sync branch November 20, 2026 16:28
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 20, 2026
@peterwilsoncc

Copy link
Copy Markdown
Contributor

@priethor @jorgefilipecosta Should this be backported to the wp/7.2 branch?

The same PHPUnit failure is happening on wp/7.2: Tests_REST_Entity_Actions_Controller::test_the_route_of_a_taxonomy_with_the_same_base_is_kept fails with "Failed asserting that actual size 3 matches expected size 2". The branch still has the route-collision check and its test, so it fails against core since r65725.

Sorry if this is a silly question, I'm not sure what is needed to be done for the compat patches.

cc @Mamaduka

@Mamaduka Mamaduka added the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 24, 2026
@Mamaduka

Copy link
Copy Markdown
Member

Thanks for the ping, @peterwilsoncc!

We usually backport test and env fixes to make the checks green. They aren't automatically synced with core, so nothing can "leak" into the develop repo.

@github-actions github-actions Bot removed the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 24, 2026
@github-actions github-actions Bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

I just cherry-picked this PR to the wp/7.2 branch to get it included in the next release: ed28518

@priethor

Copy link
Copy Markdown
Contributor Author

Thanks both, good catch!

Vedant-Gandhi pushed a commit to Vedant-Gandhi/gutenberg that referenced this pull request Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport from WordPress Core Pull request that needs to be backported to a Gutenberg release from WordPress Core Backported to WP Core Pull request that has been successfully merged into WP Core [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants