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

URL language code and hreflang #20

Open
rb2 opened this issue Nov 25, 2016 · 0 comments
Open

URL language code and hreflang #20

rb2 opened this issue Nov 25, 2016 · 0 comments

Comments

@rb2
Copy link
Owner

rb2 commented Nov 25, 2016

The problem described here: http://rb.labtodo.com/forum/post/2723/ (RU)

Редактируем: Hide default language from URL (по умолчанию активно) - сохраняем. Язык по умочланию -- Английский.
Переходим в карточку товара и видим, что hreflang для нее отсутствует.

Увидел.

Проделаем тоже самое, когда код товара выводится для обоих языков. В этом случае, при переключении языков, и в карточке товара и в категории hreflang выводится корректно, но не для главной на Английском (оно и понятно: кода языка не будет) -- нету hreflang.

Увидел.

Похоже, проблема в функции getAlterLanguageLinks (catalog/controller/common/header.php) из-за того, что $cur_lang определяется некорректно. Там код языка берётся из URL без всяких проверок, возможное отсутствие кода для языка по умолчанию не учтено.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40341979-url-language-code-and-hreflang?utm_campaign=plugin&utm_content=tracker%2F2506933&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2506933&utm_medium=issues&utm_source=github).
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

No branches or pull requests

1 participant