Problem/Motivation
Carry query adds a question mark to urls when all parameters are stripped. If all paramters are stripped, the url should not have a ? appended at the end. This is not good for SEO since there are now two urls going to the same page.
Steps to reproduce
- Configure Carryquery with query parameters to keep (ie utm_source, utm_term,utm_content, etc )
- Check "Add via javascript" in coniguration
- Create a view with exposed filters that shows content with links in the results
- Filter by an exposed filter to refresh the search results
- Links in the search result now have a ? appended to the end
Proposed resolution
If all query parameters are excluded, do not append a ? to the urls.
Remaining tasks
Implement
User interface changes
None
API changes
None
Data model changes
None
Issue fork carryquery-3587630
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
sagesolutions commentedMerge request created. Please note that I only am seeing this issue when on Drupal 11 and exposed filters are added to the url. I cannot reproduce this on Drupal 10.
Note: For testing on Drupal 11, you also need the patch from "3432138 - Drupal 10: Replace jQuery once with the core/once library" for the javascript to run properly.
Comment #4
sagesolutions commented