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

Perform a check for non-standard site languages to reduce "Incorrect locale information provided" errors #7589

Open
jamesozzie opened this issue Sep 15, 2023 · 0 comments
Labels
Type: Enhancement Improvement of an existing feature Type: Support Support request

Comments

@jamesozzie
Copy link
Collaborator

Bug Description

If a user has an invalid site language defined, which would be through a third party plugin or as a WP constant, the Site Kit dashboard may not be accessible, with errors appearing on the screen, and more via console errors.

To resolve this, perform a check for any invalid language before set up or upon visiting the dashboard. Output an error or some context if possible.

The below is on a custom hosted site with an invalid language set via wp-config

image

The below screenshot is on a TasteWP site with an invalid language set via :

add_action('locale', function(){
   return '12345_INVALID';
});

image

Steps to reproduce

  1. Set up Site Kit
  2. Define an invalid language via wp-config or functions.php (see above example in screenshot)
  3. Check the Site Health status to ensure the invalid language is applied
  4. Visit the Site Kit dashboard, where the error appears

Additional Context

  • Site Kit 1.109.9
  • This is rare, but it did come up twice in the forums
  • Internal testing

Impacted users


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

Test Coverage

QA Brief

Changelog entry

@jamesozzie jamesozzie added Type: Bug Something isn't working Type: Support Support request Type: Enhancement Improvement of an existing feature labels Sep 15, 2023
@bethanylang bethanylang changed the title Perform a check for non standard site languages to reduce "Incorrect locale information provided" errors Perform a check for non-standard site languages to reduce "Incorrect locale information provided" errors Dec 11, 2023
@bethanylang bethanylang removed the Type: Bug Something isn't working label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Improvement of an existing feature Type: Support Support request
Projects
None yet
Development

No branches or pull requests

2 participants