Skip to content

Create site on a multisite, scope not added to the subsite URL #2054

Open
@soderlind

Description

@soderlind

Blueprint:

{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"landingPage": "/wp-admin/",
	"features": {
		"networking": true
	},
	"plugins": [
		"https://github-proxy.com/proxy/?repo=soderlind/super-admin-all-sites-menu"
	],
	"siteOptions": {
		"blogname": "Main site"
	},
	"steps": [
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "restricted-site-access"
			},
			"options": {
				"activate": false
			}
		},
		{
			"step": "enableMultisite"
		},
		{
			"step": "wp-cli",
			"command": "wp site create --slug=site01"
		},
		{
			"step": "wp-cli",
			"command": "wp site create --slug=site02"
		},
		{
			"step": "wp-cli",
			"command": "wp site create --slug=site03"
		},
		{
			"step": "wp-cli",
			"command": "wp site create --slug=site04"
		},
		{
			"step": "wp-cli",
			"command": "wp site create --slug=site05"
		},
		{
			"step": "login",
			"username": "admin"
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/mu-plugins/allsitesmenu-notice.php",
			"data": "<?php add_action('admin_notices', function() {  echo '<div class=\"notice notice-info is-dismissible\"><p>Check All Sites in the admin bar.</p></div>'; });"
		}
	]
}

Playground: https://playground.wordpress.net/?blueprint-url=https://rg.gosu.cc/soderlind/super-admin-all-sites-menu/refs/heads/main/blueprint.json

URL to the main site is https://playground.wordpress.net/scope:SCOPE-NAME/wp-admin/

But the subsites get the url https://playground.wordpress.net/site01/wp-admin/ eg, without scope, so if I try to go to the subsite site, I'm redirected to main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions