[wp-trac] [WordPress Trac] #49146: Corrupted inner REST API requests.

WordPress Trac noreply at wordpress.org
Mon Feb 3 17:31:59 UTC 2020

#49146: Corrupted inner REST API requests.
 Reporter:  vavra7        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  REST API      |     Version:  4.4
 Severity:  normal        |  Resolution:  duplicate
 Keywords:  needs-patch   |     Focuses:  rest-api

Comment (by kosso):

 I have arrived here after having the same issue since we stopped using a
 'Classic Editor' plugin and switched to Gutenberg Blocks.

 I see the OP mentions "Wordpress is using the `site_url` host instead of
 the `home` host for composing inner REST API requests."

 The way I see it is the other way around. Surely?

 I thought `site_url` was the WordPress installation and `home` was the (or
 can be a) decoupled site on another domain, being fed by the REST API?  Am
 I wrong?

 eg: kosso.mydomain.com is my Wordpress install.    local.mydomain.com is a
 'decoupled' Angular site.

 If I change `site_url` to local.mydomain.com , then wp-admin 'breaks',
 with errors caused by styles and scripts being loaded from the wrong
 domain. (eg: jQuery) ie: the decoupled one.

 Also with this example, if I put kosso.mydomain.com in the `home` option
 field, my permalinks will also be poit to the worng (WP install) host too.

 Running Wordpress 5.3.2.

 Any info or pointers would be great thanks.

Ticket URL: <https://core.trac.wordpress.org/ticket/49146#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list