Hreflang generator should respect http protocol #213
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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.