resource_conflict
Resource Conflict helps you prevent double-booking of time-based content. It checks nodes that use Date range fields and stops editors from saving entries that overlap with existing ones, listing the conflicting nodes so they can adjust the dates instead of creating duplicates.
Typical use cases include booking rooms, lab equipment, or other shared
resources where only one item should be scheduled for a given time span.
Drupal 10+
Features
- Validates Date range fields on node forms and blocks overlapping entries.
- Lists all conflicting nodes so editors can see what is already booked.
- Also checks conflicts during entity presave, throwing an exception when code tries to save a conflicting node.
- Supports optional time buffers (for example a few minutes before or after) so events have a bit of padding.
- Can compare across multiple content types that share the same Date range field, or be limited to a single bundle.
- Allows you to replace the built-in validation message with your own logic in custom code.
Configuration
- Add a Date range field to each content type that should be checked for time clashes.
- Edit the content type and open Additional settings → Resource conflict.
- Enable conflict checking, pick the Date range field, and, if needed, add start/end buffers using
strtotime()-style expressions (for example-5 minutesto pad the start time). - Save the content type configuration.
You can configure multiple bundles this way. When the same Date range field is shared across content types, conflicts can span bundles unless
Restrict conflicts to this content type is checked. You can
also disable the built-in validation message via Show a default
validation error if you plan to handle conflicts entirely in custom
code.
Integration
Resource Conflict exposes Symfony events so other modules can react to conflicts and adjust behaviour.
-
Symfony events
resource_conflict.conflict_validation(Drupal\resource_conflict\Event\ConflictValidationEvent) fires whenever a Resource Conflict–enabled node form validates. Subscribers receive the unsaved node, the form, the form state, and the current list of conflicts so they can add or replace validation before Drupal processes errors.resource_conflict.conflicts_filter(Drupal\resource_conflict\Event\ConflictsEvent) fires after conflicts are gathered and allows subscribers to inspect or filter them before validation errors or presave exceptions are raised.
Drupal 7 and earlier
Resource Conflict also has releases for Drupal 6 and 7 that were built around Rules, Entities/CCK, and Date.
Drupal 7 reached its end of life in January 2025, and Resource
Conflict no longer has an active D7 release. Development and support for D7 are not planned going forward, so the issue queue is focused on Drupal 10+ and newer release lines.
Drupal 7 documentation
- Blog post on creating a resource booking system & calendar (Drupal 7)
- Documentation on setting up a Rule to handle conflict checking against a specific resource (Drupal 7)
Credits
Resource Conflict was originally developed by Andrew Berry
([email protected]) for the Protein Dynamics lab at the
University of Guelph and later rewritten for Rules/Entity integration by
Campbell Vertesi ([email protected]).