-
Notifications
You must be signed in to change notification settings - Fork 407
Open
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Prerequisites
- I have carried out troubleshooting steps and I believe I have found a bug.
- I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
Describe the bug
When testing the RunPHPStep example and selecting Try it out, the step executes successfully but the browser console shows a warning about using a relative path to load wp-load.php. The example currently uses:
require_once 'wordpress/wp-load.php';
This works temporarily because Playground rewrites the path, but the warning states that path rewriting will be removed in the future.
Expected behavior
The example blueprint should use an absolute path so that it runs without console warnings and remains compatible with the updated Playground directory structure.
Actual behavior
The console shows this warning:
It looks like you're trying to load WordPress using a relative path 'wordpress/wp-load.php'.
Playground recently changed the working directory from '/' to '/wordpress' to better mimic
how real web servers work. This means relative paths that used to work may no longer
point to the correct location.
Playground automatically updated the path for you, but at one point path rewriting will be removed.
Please update your code to use an absolute path instead:
Instead of: require_once 'wordpress/wp-load.php';
Use: require_once '/wordpress/wp-load.php';
Steps to reproduce
- Go to the RunPHPStep documentation page.
- Click Try it out on the provided example.
- Observe the browser console – the code runs, but the warning appears about the relative path.
- Update the example blueprint to:
{
"steps": [
{
"step": "runPHP",
"code": "<?php require_once '/wordpress/wp-load.php'; wp_insert_post(array('post_title' => 'wp-load.php required for WP functionality', 'post_status' => 'publish')); ?>"
}
]
}
This fixes the warning and ensures future compatibility.
Isolating the problem
- I have deactivated other plugins and confirmed this bug occurs when only this plugin is active.
- This bug happens with a default WordPress theme active.
- I can reproduce this bug consistently using the steps above.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.