Prevent creating duplicates based on combination of fields

Created on 11 January 2021, almost 4 years ago
Updated 1 August 2024, 4 months ago

Problem/Motivation

As a site administrator, I want to ensure there is no duplicate content on the site based on several fields (i.e. not just title).

Proposed resolution

Add a way to configure multiple fields to be unique, update the anti duplicate logic to evaluate based on the new config.

Remaining tasks

  1. Write patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commits

User interface changes

To be determined

API changes

To be determined

Data model changes

To be determined

Feature request
Status

Active

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇧🇪Belgium dieterholvoet Brussels

    This sounds like a very useful feature. I have been thinking about it, and I think this would be a good way to implement it:

    • We move most settings to a vertical tab on the node type edit page (/admin/structure/types/manage/<bundle>). This way settings can be different for every node type.
    • We give show a list of fields with a checkbox next to them, giving the user the option to enable it for matching. For every field, we also give the option to choose between matching types:
      • Exact match
      • Contains any word (only for text-based fields)
      • Contains a sequence of the title keywords (only for text-based fields + not sure if this query makes sense, if we should keep it, but that's a separate discussion)
    • Maybe we also offer the option to choose if one of the fields must match (OR), or if all of them must match (AND)

    @matsbla does this sound like a good idea to you? If so I wouldn't mind implementing it.

Production build 0.71.5 2024