Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I have searched extensively and cannot find anything on this issue:
I have activated clean URLs and give a URL alias to all my content type nodes.
When I perform a search with the default search tool, then I get both the node AND the aliased node.
E.g. for node http://mysite.com/node/58 aliased to http://mysite.com/aliased-article, a search will pull:
Search results
- ...
- Article title [i.e., linking to the node]
- Article title [i.e., linking to the alias]
- ...
And so on for all the results that show up in the search.
In other words, all results show up twice, once as a node and once as a URL alias.
Is that a bug, or a feature?
If it is a feature, how do I disable it?
Thanks in advance
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein as a volunteer commentedIt shouldn't be happening, but I'm not sure it's a bug with core - I don't think I've ever heard of it happening before. Are you using any contrib modules that are search-related or URL-alias-related that might be affecting things here?
Comment #2
jhodgdonCan you provide more details on exactly how you are performing the search -- are you using Views, or the core Search module, or Solr, or something else? What search terms did you use? And do you have any additional search-related modules enabled?
Because I just tried this on simplytest.me in 7.42 with just Drupal Core and the standard install profile:
a) Created a Basic Page node with title "Hello" body "This is my test node", and alias "test_node".
b) Went to the Status report and clicked "run cron manually"
c) Searched for the word "this". I got exactly one search result, my test node, and the URL for it was my alias.
So I cannot reproduce this problem in Drupal Core with just the core Search module. I will leave it open for a few days with "Postponed (maintainer needs more info)" in case you want to provide more details; if none are provided I will close it with "Cannot reproduce" as I cannot reproduce the error with just the core modules.
Comment #3
jhodgdonI just noticed this issue was originally reported back in May. I imagine the reporter probably figured out what happened, and it wasn't actually a Search module issue. I'm going to just close this. If there is still a problem, please provide steps to reproduce the problem using Drupal Core only, and set the status back to "Active".