Make WordPress Core

Opened 5 hours ago

Closed 5 hours ago

#66330 closed defect (bug) (fixed)

Connectors: Match the settings route the way the REST server does

Reported by: jorgefilipecosta Owned by: jorgefilipecosta
Priority: normal Milestone: 7.2
Component: General Version:
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

_wp_connectors_rest_settings_dispatch() checks the request route on its own instead of matching it the way WP_REST_Server does, so the two can be inconsistent.

The route should be matched with the REST server's own pattern, @^/wp/v2/settings$@i.

Follow-up to [61749], [62684].

Change History (2)

This ticket was mentioned in ​PR #14360 on ​WordPress/wordpress-develop by ​@jorgefilipecosta.


5 hours ago
#1

  • Keywords has-patch has-unit-tests added

Follow-up to https://core.trac.wordpress.org/changeset/61749 and https://core.trac.wordpress.org/changeset/62684.

This PR matches the route in _wp_connectors_rest_settings_dispatch() with the REST server's own pattern, @^/wp/v2/settings$@i, to fix possible inconsistencies with how the server matches routes.

Testing

Verify unit tests are passing:

npm run test:php -- --group connectors

Use of AI Tools

AI assistance: Yes
Used for: drafting the fix, the tests and this description; reviewed and edited by me.

#2 @jorgefilipecosta
5 hours ago

  • Owner set to jorgefilipecosta
  • Resolution → fixed
  • Status new → closed

In 64432:

Connectors: Match the settings route the way the REST server does.

_wp_connectors_rest_settings_dispatch() now matches the request route with the REST server's own pattern, to fix possible inconsistencies with the server's route matching.

Follow-up to [61749], [62684].

Props mcliwanow, jorgefilipecosta.
Fixes #66330.

Note: See TracTickets for help on using tickets.