Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

Backup: Empty files are not restored on WoA sites #96616

Open mmtr opened 16 hours ago

mmtr commented 16 hours ago

Quick summary

Some plugins like UICore Framework can have empty files that are loaded with include/require.

These empty files are backed up properly by Jetpack Backup, but they are not restored on WoA sites. They are restored on self-hosted sites, so apparently there is something in the Atomic platform that ignores/excludes empty files during restore. cc @jmdodd @a8caustin

This is what happened in 9058465-zd-a8c, where we restored a backup of a WoA site with the UICore Framework plugin, but the plugin couldn't be activated because of a fatal error caused by a missing empty file which was not restored from the backup.

Steps to reproduce

What you expected to happen

What actually happened

PHP Fatal error:  Uncaught Error: Failed opening required '/srv/htdocs/wp-content/plugins/my-plugin/includes/empty.php' (include_path='/:.') in /srv/htdocs/wp-content/plugins/my-plugin/plugin.php:12
Stack trace:
#0 /wordpress/core/6.7/wp-admin/includes/plugin.php(2387): include_once()
#1 /wordpress/core/6.7/wp-admin/includes/plugin.php(673): plugin_sandbox_scrape('my-plugin/plugi...')
#2 /wordpress/core/6.7/wp-admin/plugins.php(60): activate_plugin('my-plugin/plugi...', 'https://testmmt...', false)
#3 {main}
  thrown in /srv/htdocs/wp-content/plugins/my-plugin/plugin.php on line 12

Impact

One

Available workarounds?

No and the platform is unusable

If the above answer is "Yes...", outline the workaround.

No response

Platform (Simple and/or Atomic)

Atomic

Logs or notes

No response

github-actions[bot] commented 16 hours ago

Support References

This comment is automatically generated. Please do not edit it.

jartes commented 12 hours ago

📌 REPRODUCTION RESULTS

📌 ACTIONS

@jeherve sorry for asking, but, which team should have this issue assigned? It's a customer report that we are pc4f5j-4Yq-p2. Thank you!