Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RunPHPWithOptionsStep demo returns nothing #1162

Open
flexseth opened this issue Mar 30, 2024 · 4 comments
Open

RunPHPWithOptionsStep demo returns nothing #1162

flexseth opened this issue Mar 30, 2024 · 4 comments
Assignees
Labels
Good First Issue Good for newcomers [Type] Bug An existing feature does not function as intended [Type] Documentation Improvements or additions to documentation

Comments

@flexseth
Copy link
Collaborator

No content on demo

https://wordpress.github.io/wordpress-playground/blueprints-api/steps/#RunPHPWithOptionsStep

image

Neither Blueprint API or function API demos are working

@flexseth
Copy link
Collaborator Author

Error

Error: Invalid blueprint: must have required property 'code' at /steps/0
    at compileBlueprint

@flexseth flexseth added the [Type] Bug An existing feature does not function as intended label Mar 30, 2024
@flexseth flexseth added the [Type] Documentation Improvements or additions to documentation label Mar 30, 2024
@bgrgicak bgrgicak added the Good First Issue Good for newcomers label Apr 1, 2024
@stgeer
Copy link

stgeer commented May 17, 2024

I think this issue is caused by the code key, according to the documentation it should start with "<?php require_once 'wordpress/wp-load.php'; ".

Therefore the request should be updated as follows:

{
    "steps": [
        {
            "step": "runPHP",
            "options": {
                "code": "<?php require_once 'wordpress/wp-load.php'; ?php echo $_SERVER['CONTENT_TYPE']; ?>",
                "headers": {
                    "Content-type": "text/plain"
                }
            }
        }
    ]
}

It should then return a successful response.

@stgeer
Copy link

stgeer commented May 17, 2024

Can this one be assigned to me pls?

@bgrgicak
Copy link
Collaborator

Can this one be assigned to me pls?

Sure, thank you for helping 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for newcomers [Type] Bug An existing feature does not function as intended [Type] Documentation Improvements or additions to documentation
Projects
No open projects
Status: No status
Development

No branches or pull requests

3 participants