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
We update the travis.yml to run tests on all branches. Currently tests were run only on master and devel branches.
Update codeception to version 4 and also add the codeception/module-asserts, since it is a requirement for the newer codeception versions.
Change all tests to use the newly introduced BaseTestCase class.
Fix the breaking ReverseHardLinkTest.
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.
This PR is related with an issue that is addressed on https://github.com/transifex/transifex-live-wordpress/issues/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 anhttps
suffix. Thetokenized_url
value will have anhttp
suffix if the update action is performed through the HTTP protocol, respectively.This can be verified by running the following query.
Solution
The generated link of the target languages should adhere to the HTTP protocol of the client request.
Other Changes
travis.yml
to run tests on all branches. Currently tests were run only onmaster
anddevel
branches.codeception/module-asserts
, since it is a requirement for the newer codeception versions.BaseTestCase
class.ReverseHardLinkTest
._bootstrap.php
from thecodeception.yml
, since it is deprecated. Note: Some of the work relies on the changes suggested on this PR.