;; Referential Integrity for CCK
;; Original author: markus_petrux (


This module provides a method to enforce referential integrity rules for CCK
user and node reference fields. In other words, it allows you to decide what
to do with reference values when a referenced entity (node or user) is deleted.

The problem:

CCK node and user reference fields may contain values that point to nodes or
users that have been removed. CCK does nothing when a node or user is removed
with the values of fields that reference them. So after some time, your node
and user reference fields may contain records that point to nowhere. Orphans.

- Extension for reference fields:

  Once the module has been installed, the user and node reference field
  settings form will provide a new option "Referential integrity behavior".

  Available options are:

  - None (default).
  - Set NULL (set the value of this field to NULL when referenced users/nodes
    are deleted).

- Monitoring orphan records:

  You can also review all your reference fields to monitor if they have orphan
  records from Administer -> Content management -> Content -> Orphan references.

  This report displays the total number of records in the tables used for each
  reference field, and also the number of orphan records found, if any.

  For the tables where orphan records have been found, you can then list these
  records to review them manually, or to set their values to null. You should
  make backups of your database before processing orphans should you need to
  revert any changes made from this panel.


- CCK (node and user reference modules).

- Format Number API (used to format numbers in the administration reports).


- Be sure to install all dependent modules.

- Copy all contents of this package to your modules directory preserving
  subdirectory structure.

- Go to Administer -> Site building -> Modules to install module.

- Review the settings of your user and node reference fields. You will
  find a new option labelled "Referential integrity behavior". It is
  disabled by default.


- Original versions of the icons can be found free from here: