Closed (fixed)
Project:
Uniqueness
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Dec 2011 at 18:47 UTC
Updated:
4 Jan 2014 at 01:39 UTC
Jump to comment: Most recent
Comments
Comment #1
bforchhammer commentedHi Jorge,
The module does not provide a "similarity function" as such, but uses e.g. the core search module to find related content.
You can call the
uniqueness_contentfunction directly, which will give you an array of nodes with similar titles/content -- depending on the configured search mode.Comment #2
Yorgg commentedHi bforchhammer,
Thank you for the quick reply.
I have configured the module for uniqueness in the page content type for simple node title search.
I understand this is the first programmatic approach to duplicates in Drupal 7.
PHP is not going inside the foreach and I'm not understanding the purpose of $result.
I have set $my_string_title with the title of the desired node to be verified but when I run the code again it is continuing to programmatically create another node with the same titles.
What about the nids and the title?
Kind Regards,
Jorge.
Comment #3
bforchhammer commentedAs I said, the module only provides "similarity search", it does not prevent duplicates... that's something you have to do yourself. (Also, there may be other modules that can help you with that).
$similar_nodescontains a list of nodes which have a similar title to the one you have put into$my_string_title.Foreach iterates over that list.
Comment #4
bforchhammer commentedClosing this issue, please reopen if there's further questions.