[wp-trac] [WordPress Trac] #55489: Defining SHORTINIT creates an error when index.php is loaded

WordPress Trac noreply at wordpress.org
Wed Mar 30 19:31:49 UTC 2022


#55489: Defining SHORTINIT creates an error when index.php is loaded
-----------------------------------------------+---------------------------
 Reporter:  gerendo                            |       Owner:  (none)
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
                                               |  Review
Component:  Bootstrap/Load                     |     Version:  5.9.2
 Severity:  normal                             |  Resolution:
 Keywords:  has-screenshots close 2nd-opinion  |     Focuses:  rest-api
-----------------------------------------------+---------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-screenshots close => has-screenshots close 2nd-opinion


Comment:

 Replying to [comment:2 TimothyBlynJacobs]:
 > `SHORTINIT` doesn't load the majority of WordPress, you can see where it
 [https://github.com/WordPress/wordpress-
 develop/blob/bcb3299a37712b61eb9b2a92c0b2fcc81e5d3d9d/src/wp-
 settings.php#L149 stops loading in `wp-settings.php`]. This includes the
 REST API.

 Maybe we could check early in the REST API bootstrap whether `SHORTINIT`
 is defined, and display an appropriate error message in that case? I think
 that would be a better developer experience.

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


More information about the wp-trac mailing list