-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Edit site: fix site base URL #25409
Edit site: fix site base URL #25409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amen. I had the same issue on a subfolder installation... (localhost/lemon
)
Code looks good 👍
Size Change: +24 B (0%) Total Size: 1.2 MB
ℹ️ View Unchanged
|
@@ -18,7 +18,9 @@ const { fetch } = window; | |||
*/ | |||
export default async function findTemplate( path, getEntityRecords ) { | |||
const { data } = await fetch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this use apiFetch instead? I believe it might solve the issue as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd have to move the endpoints to use the REST API instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this is a requirement for apiFetch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no option in apiFetch to change the root URL. In this case, the root URL would be the site URL instead of the REST API URL.
Too quick to merge :P |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I see this is OK, thank you!
Description
I'm blocked by this issue because my test site is not installed on the top level domain, so merging as soon as it passes. Might be nice to try to use apiFetch in the future? I don't see why this cannot be done through the REST API...
How has this been tested?
Screenshots
Types of changes
Checklist: