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

wp-now plugin updates don't work #178

Open
bgrgicak opened this issue Mar 5, 2024 · 4 comments
Open

wp-now plugin updates don't work #178

bgrgicak opened this issue Mar 5, 2024 · 4 comments
Assignees
Labels
Bug Something isn't working VS Code wp-now

Comments

@bgrgicak
Copy link
Collaborator

bgrgicak commented Mar 5, 2024

Plugin updates in wp-now fail with a Update failed: Could not remove the old plugin. error.
After reloading the plugin doesn't show up anymore and it's deleted from the filesystem.

Plugin updates in wp-now should work like in any other WordPress environment.

This issue is the root cause of #160 and #134

There was some previous research done here: #134 (comment)

@adamziel
Copy link
Collaborator

@bgrgicak is the root cause of this issue known now?

@bgrgicak
Copy link
Collaborator Author

No, I did more research but couldn't find the issue.
@sejas could there be something specific to how wp-now works that would prevent plugin updates?

@sejas
Copy link
Collaborator

sejas commented Mar 13, 2024

@bgrgicak , I think it's not related to wp-now or the way we mount the folders.
I tried in WordPress mode which is the most "plain" way to run the Playground and I got the same error.

Here are my observations during the test:

  1. When clicking update, the plugin folder is deleted from the computer filesystem.
  2. WordPress returns an error Update failed: Could not remove the old plugin..
  3. After refreshing the browser WordPress throws errors about not being able to load the plugin files.
Warning: include_once(/var/www/html/wp-content/plugins/classic-editor/classic-editor.php): Failed to open stream: No such file or directory in /var/www/html/wp-settings.php on line 473

Warning: include_once(): Failed opening '/var/www/html/wp-content/plugins/classic-editor/classic-editor.php' for inclusion (include_path='.:') in /var/www/html/wp-settings.php on line 473

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-settings.php:473) in /var/www/html/wp-admin/includes/misc.php on line 1431

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-settings.php:473) in /var/www/html/wp-includes/functions.php on line 7049

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/wp-settings.php:473) in /var/www/html/wp-admin/admin-header.php on line 9
  1. When restarting wp-now the plugin is successfully deactivated, I don't see the header errors and I'm able to install it again.

My guess is that the folder remains present in VFS, probably an empty folder. I didn't validate it though.

@SiobhyB
Copy link

SiobhyB commented May 14, 2024

I've verified the plugin still exists at the /var/www/html/wp-content/plugins... path after updating, even though it's removed in the local plugin directory.

I have been experimenting with a custom plugin that attempts to manually sync the VFS and local file deletions, but haven't been able to figure out something that works as of yet. I'd be grateful for any other ideas or tips, as I'm feeling somewhat blocked on a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working VS Code wp-now
Projects
None yet
Development

No branches or pull requests

4 participants