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

Fix condition check count languages in getAlternativeLangsUrl #15974

Merged
merged 1 commit into from Oct 16, 2019

Conversation

@dariusakafest
Copy link
Contributor

dariusakafest commented Oct 16, 2019

Questions Answers
Branch? develop
Description? Fix condition check count languages in getAlternativeLangsUrl. Condition if ($alternative_links < 2) incorrect
Type? bug fix
Category? CO
BC breaks? no
Deprecations? no
Fixed ticket? Issue, please write "Fixes #[issue number]" here.
How to test? Here you can see that the array will simply be converted to a number to perform a comparison, which will be incorrect. leave enabled one language, open front office and open code in section head you will can see one tag: link rel="alternate" href="http://site.ru/" hreflang="en-us"

This change is Reviewable

@dariusakafest dariusakafest requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 16, 2019
@Progi1984

This comment has been minimized.

Copy link
Contributor

Progi1984 commented Oct 16, 2019

Need a second approve.

@jolelievre

This comment has been minimized.

Copy link
Contributor

jolelievre commented Oct 16, 2019

@dariusakafest Thanks for the fix, although it seems completely legit Do you have any test scenarii where this caused a bug please? So that the QA team can perform tests with/without the modification?

@dariusakafest

This comment has been minimized.

Copy link
Contributor Author

dariusakafest commented Oct 16, 2019

@jolelievre leave enabled one language, open front office and open code in section head you will can see one tag:
link rel="alternate" href="http://site.ru/" hreflang="en-us"

@jolelievre

This comment has been minimized.

Copy link
Contributor

jolelievre commented Oct 16, 2019

@dariusakafest Ok I get it better now, can you please detail this on the How to test section?

@jolelievre jolelievre added this to the 1.7.7.0 milestone Oct 16, 2019
@Robin-Fischer-PS Robin-Fischer-PS self-assigned this Oct 16, 2019
@matks

This comment has been minimized.

Copy link
Contributor

matks commented Oct 16, 2019

Thank you @dariusakafest

@matks matks merged commit 94de455 into PrestaShop:develop Oct 16, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.