seo
seo copied to clipboard
Canonical doesn't support {% paginate %} pages
Description
When using {% paginate %} the url's are appended with page numbers like /p1. The canonical tag of the paginated pages are all set without page number.
Additional info
- Craft version: 3.5.17.1
- SEO version: 3.6.7
- PHP version: 7.4.9
@MarkOlijslagers did you ever find a solution to this? Im having the same issue with canonical URLs & pagination
@MarkOlijslagers did you ever find a solution to this? Im having the same issue with canonical URLs & pagination
@thomEpps , no we took this for granted. Hopefully this will be fixed in an upcoming release
It might be sufficient to change this line to
return UrlHelper::siteUrl(Craft::$app->request->getFullPath());
See: https://github.com/ethercreative/seo/blob/dc9fa7f47bb5e542afe2f7c7f8d09f047c55ce4c/src/models/data/SeoData.php#L381C41-L381C41
I am not aware of counter-issues, I'll open a PR to see if we can close this quickly.