WordPress / wordpress-playground

Run WordPress in the browser via WebAssembly PHP
https://w.org/playground/
GNU General Public License v2.0
1.63k stars 249 forks source link

Playground link is not working #1881

Open sudip-md opened 1 week ago

sudip-md commented 1 week ago

Click on playground this link which is mentioned in https://github.com/WordPress/twentytwentyfive/pull/544

Error Log https://playground.wordpress.net/#%7B%22steps%22:%5B%7B%22step%22:%22login%22,%22username%22:%22admin%22,%22password%22:%22password%22%7D,%7B%22step%22:%22installPlugin%22,%22pluginZipFile%22:%7B%22resource%22:%22wordpress.org/plugins%22,%22slug%22:%22theme-check%22%7D,%22options%22:%7B%22activate%22:true%7D%7D,%7B%22step%22:%22installTheme%22,%22themeZipFile%22:%7B%22resource%22:%22url%22,%22url%22:%22https://github-proxy.com/proxy.php?action=archive&repo=WordPress%2Ftwentytwentyfive&branch=update%2Flist%22%7D%7D,%7B%22step%22:%22activateTheme%22,%22themeFolderName%22:%22twentytwentyfive-update/list%22%7D%5D%7D

bgrgicak commented 1 week ago

@sudip-md the preview workflow in the Twenty Twenty-Five repository will need to be updated to fix Playground previews.

The WordPress version required for Twenty Twenty-Five is 6.7, so you need to set "wp": "nightly" in the blueprint.

The activateTheme step breaks because the theme is stored in a folder named twentytwentyfive-update-list and the blueprint expects a theme under the path twentytwentyfive-update/list. This can be resolved by removing the activateTheme and adding "options": { "activate": true } to the installTheme step. @vcanales This could be a good improvement to https://github.com/vcanales/action-wp-playground-pr-preview as it would benefit all workflows.

This is how a working blueprint would look like:

{
  "preferredVersions": {
      "php": "8.0",
      "wp": "nightly"
  },
  "steps": [
      {
          "step": "login",
          "username": "admin",
          "password": "password"
      },
      {
          "step": "installPlugin",
          "pluginData": {
              "resource": "wordpress.org/plugins",
              "slug": "theme-check"
          },
          "options": {
              "activate": true
          }
      },
      {
          "step": "installTheme",
          "themeData": {
              "resource": "url",
              "url": "https://github-proxy.com/proxy.php?action=archive&repo=WordPress%2Ftwentytwentyfive&branch=update%2Fzoomout"
          },
          "options": {
                "activate": true
            }
        }
    ]
}

Here is a related conversation about this error in the WordPress community Slack.

vcanales commented 1 week ago

@vcanales This could be a good improvement to https://github.com/vcanales/action-wp-playground-pr-preview as it would benefit all workflows.

I see that the links are broken now because the blueprint schema has changed, apparently? I won't have time to move over to the new schema; let me know if you'd like to take ownership of the repo and I'll transfer it.

bgrgicak commented 6 days ago

I see that the links are broken now because the blueprint schema has changed, apparently?

pluginZipFileand themeZipFile are now deprecated in favor of pluginData and themeData, but they still work.

@vcanales feel free to transfer the repo to me it shouldn't be a lot of work to keep it up to date and I'm happy to do it.

bgrgicak commented 6 days ago

@brandonpayton @adamziel I'm considering moving vcanales/action-wp-playground-pr-preview to Playground Tools. Would you prefer for it to stay a separate repository?