#39005 closed defect (bug) (fixed)
REST API: Site URL setting should not be present on multisite installations
Reported by: | johnbillion | Owned by: | pento |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | 4.7 |
Component: | Options, Meta APIs | Keywords: | has-patch commit dev-reviewed |
Focuses: | multisite, rest-api | Cc: |
Description
In register_initial_settings()
, the siteurl
setting is registered and made available to the REST API. On a multisite installation, this setting is not configurable from the General Settings screen, but due to the above it is configurable from the REST API.
This setting should not be present (and not be available to the REST API) on a multisite installation.
Attachments (2)
Change History (13)
#2
@
8 years ago
- Keywords has-patch added; needs-patch removed
Inelegant with is_multisite() checks when registering the setting.
#3
@
8 years ago
In the tests in 39005.diff, I'd just unset the 'url'
item, rather than repeating the array.
I'm fine with the conditional to fix the bug.
#4
@
8 years ago
@peterwilsoncc @pento I don't think we should register the setting at all in multisite. I am sitting next to @johnbillion and he confirmed this.
#6
@
8 years ago
- Keywords needs-refresh removed
In 39005.2.diff:
- unit tests use an array_diff to remove
url
- option not registered in multisite
Note: See
TracTickets for help on using
tickets.
Makes sense to me, as all Settings are configurable, we should remove this from the endpoint in the case of multisite. If clients want to get information about the site, (such as url) that should be retrieved form the API index, or other places. For posterity, the settings endpoint is to change configurable things, not just to provide information about the site.