Hello

Create a new node with title "unique"
Create new revision of this node with title "unique-new"
Create a brand new node with title "unique"
Restore the old revision of the first node.
Now you have 2 node with same title. "unique"

I write a new module because I don't found this module :-/
This module is much better than my http://drupal.org/project/uniquetitle

Comments

arithmetric’s picture

Title: The title field can violate the unique constraint » Reverted node revisions can have duplicate values
Category: feature » bug
Status: Active » Closed (won't fix)

Hi Sweetchack,

Thanks for reporting this issue.

When a node is reverted to an earlier revision, Drupal saves the earlier revision as the new revision without performing validation on the earlier revision to check if it is still valid.

The unique field module checks for duplicate values only when a node is validated, so it does not enforce the uniqueness test when a node is reverted.

Even if the test was enforced, the user has no way to correct the problem, because Drupal does not provide a way to modify fields of a past revision before reverting to it (the user cannot access the node edit form for a past revision).

I hope that this module is visible enough for people looking for a way to require unique titles and content. I'd appreciate a link from your project's page, since this module has a similar purpose.