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

can't restore from .zip #977

Closed
diy-pwa opened this issue Jan 29, 2024 · 3 comments
Closed

can't restore from .zip #977

diy-pwa opened this issue Jan 29, 2024 · 3 comments
Labels

Comments

@diy-pwa
Copy link

diy-pwa commented Jan 29, 2024

I am trying to restore the attached .zip file at playground.wordpress.net. It was created by downloading as .zip. I get the following error:


Warning: require(/wordpress/wp-content/mu-plugins/playground-includes/wp_http_fetch.php): Failed to open stream: No such file or directory in /wordpress/wp-content/mu-plugins/0-playground.php on line 114

Fatal error: Uncaught Error: Failed opening required '/wordpress/wp-content/mu-plugins/playground-includes/wp_http_fetch.php' (include_path='.:') in /wordpress/wp-content/mu-plugins/0-playground.php:114 Stack trace: #0 /wordpress/wp-settings.php(2): include_once() #1 /wordpress/wp-config.php(101): require_once('/wordpress/wp-s...') #2 /wordpress/wp-load.php(2): require_once('/wordpress/wp-c...') #3 /wordpress/wp-blog-header.php(2): require_once('/wordpress/wp-l...') #4 /wordpress/index.php(2): require('/wordpress/wp-b...') #5 {main} thrown in /wordpress/wp-content/mu-plugins/0-playground.php on line 114

wordpress-playground (3).zip

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Feature] Import Export [Aspect] Website [Priority] High labels Jan 29, 2024
@adamziel
Copy link
Collaborator

adamziel commented Jan 29, 2024

Thank you for reporting @diy-pwa! It looks like the wp_http_fetch transport may not be properly restored into the imported WordPress directory structure under some circumstances. Definitely a bug.

adamziel added a commit that referenced this issue Feb 5, 2024
…alth Plugin

Prior to this PR, Playground would apply a series of patches to the
WordPress source code to make it compatible with the PHP-Wasm runtime.
This PR removes the applyWordPressPatches step. All the adjustments
are now done via filters in the Playground mu-plugin.

 ## List of changes

* Site Health plugin is now enabled by default.
* The PHPRequestHandler will return a 502 status code when a request is
  received while another request is still being handled. Previously it
  would deadlock as handling a request requires an exclusive lock on the
  PHP instance. This prevents the Site Health plugin from trigerring a
  deadlock by requesting the WordPress site from inside the PHP code.
* Playground mu-plugin lives in the playground-remote package, not in the
  Blueprints package. The plugin is only used by the Web Worker where Playground
  is set up, so let's bundle those together.
* Network transports are now a part of the Playground mu-plugin and are not
  created conditionally. This solves #977.

 ## Testing instructions

* Confirm the CI checks pass.
* Customize the WordPress site in Playground, export it, restart Playground,
  import the file, confirm it worked.
* Try out the WordPress PR previewer and confirm it still works.
@adamziel
Copy link
Collaborator

adamziel commented Feb 5, 2024

#1001 explores a fix

adamziel added a commit that referenced this issue Feb 5, 2024
…alth Plugin (#1001)

Prior to this PR, Playground would apply a series of patches to the
WordPress source code to make it compatible with the PHP-Wasm runtime.

This PR removes most of those patches and the entire
`applyWordPressPatches` step.

## List of changes

* The Site Health plugin is now enabled by default. Playground's
PHP.wasm now supports enough PHP features to enable that.
* The `wp_new_blog_notification` function is no longer overridden as one
shipped by WordPress works.
* Network transports are now a part of the Playground mu-plugin and are
not created conditionally. This solves #977.
* Playground mu-plugin lives in the playground-remote package, not in
the Blueprints package. The plugin is only used by the Web Worker where
Playground is set up, so let's bundle those together.
* The `PHPRequestHandler` now returns a 502 status code when a request
is received while another request is still being handled. Previously it
would deadlock as handling a request requires an exclusive lock on the
PHP instance. This prevents the Site Health plugin from triggering a
deadlock by requesting the WordPress site from inside the PHP code.

## Testing instructions

* Confirm the CI checks pass.
* Customize the WordPress site in Playground, export it, restart
Playground, import the file, confirm it worked.
* Try out the WordPress PR previewer and confirm it still works.

cc @bgrgicak
@adamziel
Copy link
Collaborator

adamziel commented Feb 5, 2024

This should be solved now. Feel free to reopen if it happens again.

@adamziel adamziel closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants