dsp-api
dsp-api copied to clipboard
Avoiding broken links when a cited resource is (marked as) deleted
Currently if you try to access a resource that’s been marked as deleted, Knora pretends it’s never heard of that resource. This would be annoying if a resource was cited (e.g. using an ARK URL in a publication), and then someone casually marked it as deleted. We also need to think about what happens when there’s a link within a Knora repository to a resource that’s been marked as deleted.
Things that might help:
- The user who marks the resource as deleted could optionally specify an alternative resource that should be returned instead (a kind of internal redirect). Knora could then update all links within the repository, to make them point to the alternative resource.
- If there’s no alternative resource, Knora could notify the project admins of the resources that have links to the deleted resource (e.g. by email), to let them know that something needs to be done about those links.
Another thing that might help:
- before deletion, specify a list of resources that point to the object to be deleted and present it to the user, so he can be sure that it is safe to delete (or not) and adjust the dependent resources
before deletion, specify a list of resources that point to the object to be deleted
We could also do this, but it wouldn't show citations made with ARK URLs, since those could be anywhere on the Internet. Also, the user might not have permission to adjust the dependent resources, especially if they're in another project.
marked as deleted, Knora pretends it’s never heard of that resource.
it wouldn't show citations made with ARK URLs, since those could be anywhere on the Internet.
Yes, of course. So there possibly should be kind of a "This resource has been deleted" message (with date? with contact info?) as a very last fallback (after redirecting and informing) ?
Also, the user might not have permission to adjust the dependent resources, especially if they're in another project.
Would it be feasable then to send an (automated?) notification to this other project (e.g. the admin) to inform about the deletion? But that is, indeed, your second point at the top.
So there possibly should be kind of a "This resource has been deleted" message (with date? with contact info?) as a very last fallback (after redirecting and informing) ?
I guess there might be cases where it's really necessary to pretend that the resource never existed. But we could let the user decide this when they delete the resource. We already store the ID of the user who deleted the resource, the date when it was deleted, and an optional comment about why it was deleted. We just don't yet provide any way to access this information. We could let the user decide whether they want to make this information public or not.