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

Hreflang generator should respect http protocol #213

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

ThemisB
Copy link
Contributor

@ThemisB ThemisB commented May 28, 2020

This PR is related with an issue that is addressed on #210.

Problem

The href link that contains the hreflang attribute was agnostic of the browser's HTTP protocol and solely relied on the settings that users saved on the plugin page. That means, that if the administrators accessed the plugin through the HTTPS version of the site and performed an update operation then the tokenized_url value will have an https suffix. The tokenized_url value will have an http suffix if the update action is performed through the HTTP protocol, respectively.

This can be verified by running the following query.

SELECT option_name, option_value
FROM wp_options
WHERE option_name='transifex_live_settings';

Solution

The generated link of the target languages should adhere to the HTTP protocol of the client request.

Other Changes

  1. We update the travis.yml to run tests on all branches. Currently tests were run only on master and devel branches.
  2. Update codeception to version 4 and also add the codeception/module-asserts, since it is a requirement for the newer codeception versions.
  3. Change all tests to use the newly introduced BaseTestCase class.
  4. Fix the breaking ReverseHardLinkTest.
  5. Remove the _bootstrap.php from the codeception.yml, since it is deprecated.
    Note: Some of the work relies on the changes suggested on this PR.

@ThemisB ThemisB force-pushed the hreflang-should-respect-http-protocol branch 15 times, most recently from 3a6de36 to b6359eb Compare June 1, 2020 10:05
* The links that are generated should adhere to the requested http
protocol (http or https).
* We update the travis.yml to run tests on all branches.
* Update codeception to version 4.
* Change all tests to use the newly introduced BaseTestCase class.
* Fix ReverseHardLinkTest crashing test.
* Remove unused `_boostrap.php` of codeception.yml.
* Bump plugin version.
@ThemisB ThemisB force-pushed the hreflang-should-respect-http-protocol branch from b6359eb to 34802bc Compare June 1, 2020 10:06
@ThemisB ThemisB linked an issue Jun 1, 2020 that may be closed by this pull request
Copy link
Contributor

@pablotransifex pablotransifex left a comment

Choose a reason for hiding this comment

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

LGTM! All tests run and passed, hrefs verified.

@ThemisB ThemisB merged commit 456919d into devel Jun 3, 2020
@ThemisB ThemisB deleted the hreflang-should-respect-http-protocol branch June 3, 2020 08:40
ThemisB added a commit that referenced this pull request Jun 3, 2020
Merge pull request #213 to master
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.

SSL Not Being Honored
2 participants