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 the WordPress.org plugin preview #143

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

dkotter
Copy link
Collaborator

@dkotter dkotter commented Aug 6, 2024

Description of the Change

In #116 we added support for the WordPress.org plugin preview. As noted, testing that now results in an error.

Digging in I found two issues:

  1. We use a importFile step but that has been removed in favor of importWxr
  2. The landing page we send people to uses the post ID of 5 but seems that now gets imported with a post ID of 4

Both of these issues have been fixed in this PR.

How to test the Change

The WordPress Playground allows you to spin up a new environment directly through the URL, by going to https://playground.wordpress.net/# and pasting your JSON config after the #. In this case, the URL should be:

https://playground.wordpress.net/#{"$schema":"https://playground.wordpress.net/blueprint-schema.json","landingPage":"/wp-admin/post.php?post=4&action=edit","preferredVersions":{"php":"7.4","wp":"latest"},"phpExtensionBundles":["kitchen-sink"],"steps":[{"step":"login","username":"admin","password":"password"},{"step":"installPlugin","pluginZipFile":{"resource":"wordpress.org/plugins","slug":"retro-winamp-block"},"options":{"activate":true}},{"step":"importWxr","file":{"resource":"url","url":"https://raw.githubusercontent.com/10up/retro-winamp-block/d2ff63d1127713d9f2a11235a002f38f2927b0ca/.wordpress-org/blueprints/demo-data.xml"}}]}

Ensure that clicking that link loads a proper preview environment with the plugin installed and demo content loaded

Changelog Entry

Fixed - Ensure the WordPress.org plugin preview works as expected

Credits

Props @dkotter, @jeffpaul

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@dkotter dkotter added this to the 1.4.0 milestone Aug 6, 2024
@dkotter dkotter self-assigned this Aug 6, 2024
@dkotter dkotter requested a review from jeffpaul as a code owner August 6, 2024 16:52
@jeffpaul
Copy link
Member

jeffpaul commented Aug 6, 2024

@dkotter looks like some other plugins similarly use the older importFile notation... I assume its worth me pulling availability to help handle PRs on these others as well?

https://github.com/search?q=org%3A10up%20importFile&type=code

@dkotter
Copy link
Collaborator Author

dkotter commented Aug 6, 2024

looks like some other plugins similarly use the older importFile notation... I assume its worth me pulling availability to help handle PRs on these others as well?

Seems like importFile still works but recommended to replace with importWxr. The bigger issue here was the post ID changed from 5 to 4 (not sure why) so I'd say would be nice to get this updated anywhere we're using it but not critical

@dkotter dkotter merged commit 794db88 into develop Aug 6, 2024
10 checks passed
@dkotter dkotter deleted the fix/plugin-preview branch August 6, 2024 18:51
@dkotter dkotter restored the fix/plugin-preview branch August 6, 2024 18:51
@dkotter dkotter deleted the fix/plugin-preview branch August 6, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants