Skip to content

Custom login step doesn't work when provided as blueprint-url query of playground.wordpress.net #2171

@juanmaguitar

Description

@juanmaguitar

The login step of the following blueprint doesn't work when provided as blueprint-url query of playground.wordpress.net (try link) but it works when copied and pasted on Playground builder

{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"landingPage": "/wp-admin/post.php?post=1&action=edit",
	"preferredVersions": {
		"php": "8.0",
		"wp": "latest"
	},
	"login": {
		"username": "myauthoruser",
		"password": "mypass"
	},
	"steps": [
		{
			"step": "installPlugin",
			"options": {
				"activate": true,
				"targetFolderName": "vip-governance"
			},
			"pluginData": {
				"resource": "git:directory",
				"url": "https://github.com/Automattic/vip-governance-plugin.git",
				"ref": "HEAD",
				"path": ""
			}
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/plugins/vip-governance/governance-rules.json",
			"data": {
				"resource": "url",
				"url": "https://raw.githubusercontent.com/Automattic/wpvip-learn-enterprise-block-editor/refs/heads/trunk/examples/vip-governance-plugin-demo/advanced/governance-rules.json"
			}
		},
		{
			"step": "runPHP",
			"code": "<?php require '/wordpress/wp-load.php'; $user_id = wp_create_user('myauthoruser', 'mypass', 'myuser@localhost'); (new WP_User($user_id))->set_role('author');"
		},
		{
			"step": "runPHP",
			"code": "<?php require '/wordpress/wp-load.php'; wp_update_post(['ID' => 1, 'post_author' => get_user_by('login', 'myauthoruser')->ID]);"
		}
	]
}

The same happens with this other playground (check link)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions