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

[Website] Prevent creation of two temporary sites #1817

Merged
merged 2 commits into from
Sep 28, 2024

Conversation

adamziel
Copy link
Collaborator

Motivation for the change, related issues

#1731 introduced multiple Playground management. However, visiting a URL containing a Blueprint sometimes led to a creation of multiple temporary sites due to a React effect running twice. This PR prevents that error by delaying the new site creation until the effect settles down. In particular, we're waiting for the site list to either get loaded or error out.

Testing Instructions (or ideally a Blueprint)

Go to http://localhost:5400/website-server/?plugin=classic-editor&blueprint-url=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwp-json%2Fplugins%2Fv1%2Fplugin%2Fclassic-editor%2Fblueprint.json%3Frev%3D3158978%26lang%3Den_US and confirm you only got a single temporary site

@adamziel adamziel added [Type] Bug An existing feature does not function as intended [Aspect] Website labels Sep 27, 2024
@brandonpayton brandonpayton merged commit eaab4a1 into trunk Sep 28, 2024
5 of 6 checks passed
@brandonpayton brandonpayton deleted the dont-create-two-temporary-sites branch September 28, 2024 04:32
@brandonpayton
Copy link
Member

Thanks for noticing and fixing this, @adamziel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Website [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants