google / google/site-kit-wp

Perform a pre-flight check to determine mismatching URLs and provide a dedicated "Get Help" link

Open
#7,228 1 comment 0 reactions 0 assignees View on GitHub
Needs Documentation Type: Enhancement Type: Support
Dominant language
JavaScript
Stars
1.4k
Forks
383
Avg merge
4d 14h
Merged PRs (30d)
77

Description

## Bug Description

Consider adding a preflight check and outputting an specific error message in cases whereby a user has different protocols in their WordPress site settings.

Without doing so users can encounter a staging site error resulting in a "learn more" link that suggests they use the Helper plugin ([example topic](https://wordpress.org/support/topic/your-site-may-not-be-ready-for-site-kit-64/#post-16823923)). This can happen if their wp-admin panel is non secure (http) but their front end is secure (https) but loads a site independent of their WordPress site (as their hosting configurations use a www/http and also a www/https directory as opposed to merging them.

![image](https://github.com/google/site-kit-wp/assets/41326532/70f0e056-e393-4c1f-8a9c-f0c7dbf3592e)

![image](https://github.com/google/site-kit-wp/assets/41326532/aaccefbd-f266-4d16-ae42-41439f2c477b)

[Internal testing with further details and recording of experience
](https://app.asana.com/0/1185360131189553/1204882520069429/f)

## Steps to reproduce

1. Select a hosting platform that allows for different directory structure for http / https root directories
2. Setup WordPress and install (without activating) Site Kit on the non secure directory, while ensuring there is a standard html file or site in the https root directory (essentially 2 different sites)
3. Visit your WordPress general settings and set the "WordPress Address (URL)" to the non secure version of your site, with the Site Address (URL) defined as secure.
4. Visit the Site Kit splash page
5. You'll notice a message to state that you're using a staging environment, with a link suggesting you use the Help plugin

## Screenshots

## Additional Context

- We've only encountered one support topic based on this in the support forums, however, with some users making use of the Helper Plugin without needing to, I suspect others were following the guide after encountering this error.
- If we can output an error message and code specific to mismatching URLs we can have a "Learn more" link more specific to this issue.

---------------

_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

*

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction steps and the Site Kit splash page, then inspect how mismatching WordPress Address and Site Address protocols are detected and how the staging-environment message is selected. Done means this mismatch produces a specific error message and a dedicated Get Help or Learn more link instead of the generic Helper plugin guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wordpress
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.