404 in draft post preview by editor
-
Same issue as this report (it is a bug)
- default setup, editor user is not allowed to see preview of their own draft post
Load the following blueprint at https://playground.wordpress.net/ to see exactly where the plugin fails. (click preview the post once the blueprint is loaded). Proof of concept of the bug as there is no interfering other plugin.
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"plugins": [
"tutor"
],
"preferredVersions": {
"php": "8.2",
"wp": "latest"
},
"features": {
"networking": true
},
"siteOptions": {
"permalink_structure": "/%postname%/"
},
"steps": [
{
"step": "runPHP",
"code": "<?php require '/wordpress/wp-load.php'; $user_id = wp_create_user('myuser', 'mypass', 'myuser@localhost'); (new WP_User($user_id))->set_role('editor');"
},
{
"step": "login",
"username": "myuser",
"password": "mypass"
},
{
"step": "runPHP",
"code": "<?php require '/wordpress/wp-load.php'; update_option( 'concept_page_id', wp_insert_post( [ 'post_title' => 'Concept Page', 'post_content' => 'Lorem ipsum...', 'post_status' => 'draft', 'post_type' => 'post' ]));"
}
],
"landingPage": "/wp-admin/post.php?post=7&action=edit"
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘404 in draft post preview by editor’ is closed to new replies.