Skip to content

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

Merged
SiobhyB merged 3 commits into
trunkfrom
try/update-php-wasm-patch-with-latest
May 23, 2024
Merged

Fix: Ensure plugin, theme, and WordPress updates succeed#156
SiobhyB merged 3 commits into
trunkfrom
try/update-php-wasm-patch-with-latest

Conversation

@SiobhyB

@SiobhyB SiobhyB commented May 23, 2024

Copy link
Copy Markdown

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?
SiobhyB 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 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

@sejas sejas left a comment

Copy link
Copy Markdown
Member

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

SiobhyB commented May 23, 2024

Copy link
Copy Markdown
Author

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

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

SiobhyB commented May 23, 2024

Copy link
Copy Markdown
Author

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

@wojtekn

wojtekn commented May 24, 2024

Copy link
Copy Markdown
Contributor

@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

None yet

3 participants