When using the Locations tab on the search page, node results were being linked to n times, where n equals the number of matching vids in the location_instance table. Basically there was no check to ensure that only the last version is being used.
There are probably a couple of ways to handle this issue. The way I chose to handle it, slightly modifies the query against location_instance (to pull in and sort by the vid), and builds the instance_links array differently. If there is no user id, I key the array to the nid. This way only the final vid for the node will be passed as a link, and not all n occurrences of the nid in the location_instance table.
I've included a patch with my solution, I'm happy to refactor the method if there are suggestions of a better way to handle this. I'll also try to see if the same problem exists in the D6 version.
| Comment | File | Size | Author |
|---|---|---|---|
| location_search_links.patch | 957 bytes | gnat |
Comments
Comment #1
yesct commentedCould someone else apply this patch and see if it fixes the duplicate results problem? If the patch will not apply to the latest dev release, just reply back and say that, and maybe someone will re-roll the patch against the latest version.
Comment #2
yesct commentedslight chance related to #789518: Updating the node provides duplicate in views
There has been not interest or confirmation of this in 1+ years. Please try the latest version and post back if there is still a problem, making sure to set the status to needs work (as it will need a re-roll, http://drupal.org/patch/create). Thanks.
Comment #3
ankur commentedClosing due to lack of activity.