[wp-trac] [WordPress Trac] #55617: /wp/v2/pattern-directory/patterns endpoint: slug parameter has no effect on the response

WordPress Trac noreply at wordpress.org
Wed Apr 27 00:10:14 UTC 2022


#55617: /wp/v2/pattern-directory/patterns endpoint: slug parameter has no effect on
the response
--------------------------------------+----------------------------
 Reporter:  antonvlasenko             |       Owner:  antonvlasenko
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.0
Component:  REST API                  |     Version:  trunk
 Severity:  major                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  rest-api
--------------------------------------+----------------------------

Comment (by antonvlasenko):

 I've marked this bug as major because WordPress sends a request to the
 `wp/v2/pattern-directory/patterns` endpoint when a user navigates the Site
 Editor page (`/wp-admin/site-editor.php`).
 It may happen that the list of available [https://wordpress.org/patterns/
 patterns] supported by the current theme will be incorrect because the
 wrong response from the `wp/v2/pattern-directory/patterns` endpoint will
 get cached (for 1 hour).
 I haven't been able to spot any issues on the front end, but the bug is
 reproducible and can have unpredictable consequences.
 This issue is a follow-up from https://github.com/WordPress/wordpress-
 develop/pull/2488#discussion_r846384781
 FYI: @spacedmonkey

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55617#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list