Make WordPress Core

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


Ignore:
Timestamp:
10/09/2023 10:44:55 PM (7 months ago)
Author:
hellofromTonya
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56922, comment 32

    initial v1  
    22
    33>⚠️ In conclusion, the proposed patch successfully addresses the issue.
    4 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.
     4>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.
    55
    66>**Should we adjust the regex expressions for the REST routes to consistently expect the presence of the theme_name?**