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

Pagination: wrong canonical URL #1686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

e-com-presta
Copy link
Contributor

Quote: "Don't use the first page of a paginated sequence as the canonical page."
https://developers.google.com/search/docs/specialty/ecommerce/pagination-and-incremental-page-loading

@@ -445,6 +445,10 @@ public function getSeoFields()
break;

}
// append page number
if ($p = Tools::getIntValue('p')) {
$canonical .= "?p=$p";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not the right way to modify url.

At this point, we don't know what $canonical looks like. It could be https://www.domain.com/en/rewrite/url
but it could very easily be https://www.domain.con/en/rewrite?id_category=10

We shouldn't simply concat '?p=$id here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants