Ticket #1784 (closed enhancement: wontfix)

Opened 2 years ago

Last modified 2 years ago

Links to renamed objects break

Reported by: seanh Owned by: seanh
Priority: awaiting triage Milestone: ckan-v1.7
Component: ckan Keywords: activity_streams
Cc: Repository: ckan
Theme: none


The HTML templates for some activity stream activities link to objects (packages, resources, etc.) by their names, e.g. /dataset/foo, but if the object has since been renamed then the link will be broken.

Possible solutions are to use the object ID to find its current name at rendering time and link to that, or link to the object by ID rather than by name.

Linking by ID is both simpler to implement and better. Links by ID are ugly, but they are permanent and don't break when an object is renamed. We should be using links by ID everywhere on CKAN, so that when third-party sites copy-paste our URLs and link to us, their links don't break later.

Fixing this means fixing the dataset_link(), resource_link(), group_link() etc. functions in ckan/lib/helpers.py which will change the links everywhere in CKAN where those functions are used to link to objects (which should be everywhere where we link to an object).

If we want to have nice looking by-name URLs and what them to be permanent, then we need to change CKAN so that objects cannot be renamed.

Change History

comment:1 Changed 2 years ago by dread

I don't agree. I think we have a good compromise at the moment, where you have readable URLs, and people can change names if they want to. Names are changed only occasionally. The CKAN site adjusts all its links automatically of course. External blog posts may have incoming links, and these would break, but it's not difficult to search for a dataset. If we're really worried about this then we should provide a 'permalink' somewhere on the Package / Group / Resource page.

In the meantime, I suggest changing the Activity Stream links to be with names.

comment:2 Changed 2 years ago by seanh

  • Status changed from new to closed
  • Resolution set to wontfix
Note: See TracTickets for help on using tickets.