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

[Blueprints] Allow multisites to load wp-admin pages with the landingPage attribute #1913

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

bgrgicak
Copy link
Collaborator

This PR allows multisite Blueprints to load /wp-admin/ URLs using the landingPage attribute.

Before this PR multisites were configured with an incorrect base path that broke WordPress rewrites.
WordPress couldn't resolve /SITE-SLUG/wp-login.php as /wp-login.php, instead it returned the WordPress 404 page.

When a Blueprint attempts to load /wp-admin/ using the landingPage attribute, it first needs to open /wp-login.php to log in the user. But, because WordPress couldn't access /wp-login.php, logins were failing, and as a result /wp-admin/ pages couldn't be loaded.

The fix was to remove a custom base URL and let the wp core multisite-convert CLI command create automatically.
This PR also adds a test to cover this scenario, so we can make sure it doesn't happen again.

Fixes #1907

Testing Instructions (or ideally a Blueprint)

  • CI

@bgrgicak bgrgicak self-assigned this Oct 16, 2024
@bgrgicak bgrgicak requested a review from a team October 16, 2024 17:17
@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Package][@wp-playground] Blueprints labels Oct 16, 2024
Copy link
Member

@brandonpayton brandonpayton left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@bgrgicak bgrgicak merged commit 8fcba07 into trunk Oct 16, 2024
9 checks passed
@bgrgicak bgrgicak deleted the fix/1907-wp-login-404-in-multisites branch October 16, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package][@wp-playground] Blueprints [Type] Bug An existing feature does not function as intended
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

landingPage not fully working when targeting a subsite in multisite
2 participants