Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gutenberg uses wrong url for internal REST API requests #19459

Closed
vavra7 opened this issue Jan 7, 2020 · 4 comments
Closed

Gutenberg uses wrong url for internal REST API requests #19459

vavra7 opened this issue Jan 7, 2020 · 4 comments
Labels
[Type] Help Request Help with setup, implementation, or "How do I?" questions.

Comments

@vavra7
Copy link

vavra7 commented Jan 7, 2020

  1. Make clean installation of latest wordpress on http://some-wp-domain.com
  2. Go to Settings -> General and change field "Site Address (URL)" to value "http://another-frontend-domain.com". Hit "Save Changes".
  3. Go to Pages -> Sample Page make a random change and hit "Update"
  4. ERROR
    reason is that Guttenberg's internal request leads to
    http://another-frontend-domain.com/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F2&_locale=user
    expected is internal request to
    http://some-wp-domain.com/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F2&_locale=user

2020-01-07_12-54

By other words: Guttenberg uses for internal REST API requests "siteurl" domain instead of "home" domain

@youknowriad
Copy link
Contributor

Hi there! thanks for opening the issue.

I believe this was already discussed before and that it's the right approach. REST API folks would know more. cc @spacedmonkey @TimothyBJacobs

@youknowriad youknowriad added the [Type] Help Request Help with setup, implementation, or "How do I?" questions. label Jan 13, 2020
@TimothyBJacobs
Copy link
Member

Yeah, Gutenberg is using the WordPress APIs for these things so it is the correct behavior according to core.

A core trac ticket was created as well but closed because that is the intended behavior and a filter exists to change it.

@youknowriad
Copy link
Contributor

Thanks @TimothyBJacobs

@isuke01
Copy link

isuke01 commented Mar 25, 2020

@youknowriad There is more about this issue #1761
Actually Gutenberg is using incorrect url, core return correct one if you test it ;/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Help Request Help with setup, implementation, or "How do I?" questions.
Projects
None yet
Development

No branches or pull requests

4 participants