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

Fix: Ensure plugin, theme, and WordPress updates succeed #156

Merged
merged 3 commits into from
May 23, 2024

Conversation

SiobhyB
Copy link

@SiobhyB SiobhyB commented May 23, 2024

Fixes: 6891-gh-Automattic/dotcom-forge, #100

Relates to: WordPress/playground-tools#178

Proposed Changes

A fix to prevent plugins, themes, and WordPress updates from failing was recently merged into the Emscripten repository in emscripten-core/emscripten#21964. The next Emscripten release is due in around two weeks time, at which point a new release for PHP-WASM will be needed. As it may take some time for these updates to happen, and due to the high priority of this bug, I propose a temporary patch so that the fix gets to Studio users a bit quicker.

In this PR, I've updated the existing PHP-WASM patch to include the fix for update errors.

Testing Instructions

Update an outdated plugin

  • Install an outdated version of a plugin via /wp-admin's Plugins section. One way to do this is to navigate to the Advanced View on a plugin's WordPress.org page and scroll to the bottom for a dropdown of older downloads. Example: Gutenberg's Advanced View page.
  • Refresh the Plugins section and choose the option to update alongside your newly installed plugin.
  • Verify it updates as expected without error. You should notice the version number alongside the plugin change to the latest.

Recording:

updates.mov

Update an outdated version of WordPress

  • Roll your local WordPress environment back to an older version.
  • Click any of the prompts to update to the latest version of WordPress. These will generally be found in the header or footer section of any admin page, or by navigating directly to DashboardUpdates in /wp-admin.
  • Verify that the update is successful and that your site is now using the latest available version of WordPress.

Recording:

wordpress-update.mov

General smoke testing

Ensure no regressions by testing general functionality related to installations. It should still be possible to install plugins and themes as before.

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Siobhan added 3 commits May 22, 2024 15:50
The fix available is now included in the main @php-wasm/node/index.cjs file, so this patch is no longer necessary.
@SiobhyB SiobhyB added [Type] Bug Something isn't working Studio App labels May 23, 2024
@SiobhyB SiobhyB self-assigned this May 23, 2024
@SiobhyB SiobhyB marked this pull request as ready for review May 23, 2024 12:58
@SiobhyB SiobhyB requested review from a team May 23, 2024 12:58
Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SiobhyB , First of all ... You are AWESOME!
Congrats for working on this bug until the very end and creating a PR on https://github.com/emscripten-core/emscripten 👏

I think it's good idea to ship this change until the fix is released in the dependency libraries.

I tested updating a plugin and whole WordPress and both worked as expected. Yay!

Update plugin

update-plugin.mp4

Update WordPress

update-wordpress.mp4

@SiobhyB
Copy link
Author

SiobhyB commented May 23, 2024

@sejas, thanks so much for all your help and support with this one, too! 🙌

@SiobhyB SiobhyB merged commit dc7df53 into trunk May 23, 2024
17 checks passed
@SiobhyB SiobhyB deleted the try/update-php-wasm-patch-with-latest branch May 23, 2024 15:10
@SiobhyB
Copy link
Author

SiobhyB commented May 23, 2024

@wojtekn, is there still time to get this one into the 1.0.3 release?

@wojtekn
Copy link
Contributor

wojtekn commented May 24, 2024

@SiobhyB yes!

Thanks for the fix, works great now. I tested it with my local site that uses MySQL and it updated Jetpack from 13.4.2 to 13.4.3 successfully. I also tested upgrading the whole WordPress core from 6.5.2 to 6.5.3 and from 6.4.3 to 6.5.3 and both cases worked fine, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Studio App [Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants