rsc_gone

This model tracks deleted resources (see model#rsc). Its primary goal is to be able to determine if a resource never existed, has been deleted or has been replaced by another resource.

Information kept

Only very basic information of the deleted resource is kept in the rsc_gone table. It is enough for referring to a new location, giving correct errors or to determine who deleted a resource.

The saved category, content group, visibility and ownership fields are used for an ACL filter on the deleted-pages overview.

Display labels are kept in props_json; complete resource data remains in module#mod_backup revisions. Restoring a resource removes its tombstone. Only category/content-group labels are copied. props_json.deleter_id identifies the deletion actor; person titles are read from live resources through the normal ACL checks.

The public model paths below expose only routing information. Reading archived metadata requires admin access plus update permission on the saved ACL fields (is_editable/2). ACL modules implement view_deleted on an acl_rsc snapshot and acl_rsc_gone_sql for SQL filtering; unsupported modules fail closed. Legacy metadata is populated in resumable background batches by mod_backup.

Properties

Whenever a resource is deleted through model#rsc, some information from that resource is copied to the rsc_gone table.

The following properties are saved:

PropertyDescriptionExample value
idId of the resource, an integer.42
new_idIf the resource is replaced by another resource then this is the id of that other resource.341
new_uriIf the resource is moved to another place on the web then this is the uri of the new location.<<"<http://example.com/hello>">>
nameThe name (if any) of the deleted resource.<<"page_hello">>
uriThe uri of the authoritative source for the resource.<<"<http://foo.bar/hello>">>
page_pathThe page path (if any) of the deleted resource.<<"/hello">>
is_authoritativeWhether the resource originated on this site or was imported and maintained on another site. Return a boolean.true
creator_idThe id of the creator of the deleted resource.1
createdThe date the deleted resource was created.{{2008,12,10},{15,30,00}}
modifier_idThe id of the user that deleted the resource.2718
modifiedThe date the resource was deleted.{{2012,12,5},{23,59,59}}

Available Model API Paths

MethodPath patternDescription
get/+id/new_location/...Return category data for +id. Uses get_new_location.
get/+id/is_gone/...Return whether gone (is_gone).
get/+id/followup/...Resolve a live local resource, following replacement IDs. Does not authorize access to its properties.

/+name marks a variable path segment. A trailing /... means extra path segments are accepted for further lookups.

Edit on GitHub