WordPress.org

WordPRess GSoC Trac

Opened 9 months ago

Last modified 9 months ago

#333 new defect

Multisite Aware

Reported by: technosailor Owned by:
Milestone: Priority: normal
Component: JSON REST API Keywords:
Cc:

Description

The JSON API should be Multisite Aware. Currently it is not. In my case, I have Blog ID 74 and wp-json.php is being interpreted as a blog, Multisite is finding it doesn't exist and then NOBLOGREDIRECT happens.

Change History (7)

comment:1 rmccue9 months ago

Does this still occur with the multisite plugin enabled? (Note that both should be activated network wide.)

(Technically, this isn't in scope, but I'd like to make sure it at least doesn't break.)

comment:2 follow-up: pushred9 months ago

I tried downloading the multisite plugin you linked here but it's not showing up in the Network Admin when the dir is dropped into /wp-content/plugins. Am I missing something?

Also, in a multisite install, what would the base URL look like?

comment:3 pushred9 months ago

Nevermind! Seems to have shown up after a few minutes. Still not sure about the base URL though.

Last edited 9 months ago by pushred (previous) (diff)

comment:4 in reply to: ↑ 2 rmccue9 months ago

Replying to pushred:

Also, in a multisite install, what would the base URL look like?

The index should live at http://example.com/wp-json.php/ (assuming your base site is located at http://example.com/, and the normal API should be available at http://example.com/wp-json.php/sites/<site>/ for each site. (You should be able to use either the blog ID (an integer) or the blog's name (subdirectory name or subdomain).

This hasn't had much testing on my end, so I appreciate any testing that goes in to it! Let me know if things break and I'll do my best to fix those up.

comment:5 technosailor9 months ago

This didn't work for me but it could be because we have a jacked up Multisite installation as well. I'll try it on my own Multisite and see if it works there

comment:6 follow-up: technosailor9 months ago

Nah... doesn't work. Appreciate the effort though. Maybe we can huddle back up when the GSoC project is done... :)

comment:7 in reply to: ↑ 6 rmccue9 months ago

Replying to technosailor:

Nah... doesn't work. Appreciate the effort though. Maybe we can huddle back up when the GSoC project is done... :)

Note that as it's not within the scope of my GSoC project, I can accept pull requests/patches for this. (It also means that it'll only get minimal attention in terms of my actual development time though.)

Note: See TracTickets for help on using tickets.