nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
162 stars 68 forks source link

Pagination next/prev with trailing slash #1401

Closed WHITE-developer closed 4 months ago

WHITE-developer commented 5 months ago

Describe the bug

The pagination next/prev meta are getting a trailing slash when using pageTrigger with query param (eg ?page) and addTrailingSlashesToUrls is enabled. This due to the UrlHelper.php:L152. The passed in url already has the query param DynamicMeta.php:L102, so we end up with something like https://site.com/news/?page=2%2F

Expected behaviour

Trailing slash shouldn't be added to the query param.

Versions

WHITE-developer commented 4 months ago

@khalwat ?

khalwat commented 4 months ago

Will get this addressed shortly.

khalwat commented 4 months ago

Fixed in the commits above.

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop as 3.4.73”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v4 as 4.0.43”,

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-seomatic": "dev-develop-v5 as 5.0.0-beta.6”,

Then do a composer clear-cache && composer update