Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #56922, comment 31


Ignore:
Timestamp:
10/09/2023 10:53:28 PM (12 months ago)
Author:
antonvlasenko
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56922, comment 31

    initial v1  
    6161=== Notes===
    6262⚠️ In conclusion, the proposed patch successfully addresses the issue.
    63 However, the controllers expect the `template_id` and `template_part_id` to always follow the format `theme_name//<template(_part)_name`. In practice, it's not possible to retrieve a template or template part using only their template name (i.e., `post_name`). The `get_block_template()` function, employed by both REST controllers, presumes that the ID is divided into two parts separated by `//`. The theme's name must always be included in the request alongside the template (part) name. Should we adjust the regex expressions for the REST routes to consistently expect the presence of the `theme_name`?
     63However, the controllers expect the `template_id` and `template_part_id` to always follow the format `theme_name//<template(_part)_name`. In practice, it's not possible to retrieve a template or template part using only their template name (i.e., `post_name`). The `get_block_template()` function, employed by both REST controllers, presumes that the ID is divided into two parts separated by `//`. The theme's name must always be included in the request alongside the template (part) name. Should we adjust the regular expressions for the REST routes to consistently expect the presence of the `theme_name`?
    6464