Group URLs should use group number, not group name

While working on changes to a group I intend to launch shortly, I realized that URLs, pointing to the group and its library, include the group name. This means, if the group name is changed all previous URLs to group home page or individual items are now broken. Further, groups with long names lead to long URLs, which is sometimes not desirable.

At the same time, each group also has a unique group number attached to it, which I believe does not change when you make changes to the group. Thus, it is unique and unchanging for the life of the group.

For example, given below are three URLs pointing to a group's home page, it's library home page, and individual item in the library.

https://www.zotero.org/groups/tee
https://www.zotero.org/groups/tee/items
https://www.zotero.org/groups/tee/items/itemKey/TD2DEPHD

The group name is "TEE" and this shows up in the URLs. This group also has a number assigned to it: "310273". You can substitute the "tee" in the URL with "310273" and the links work fine, but they get redirected with "tee" for second and third URL in above list.

For example, https://www.zotero.org/groups/310273/items

Wouldn't it be better to just use the group number and never promote group name in the URL?
  • I'm pretty sure the group name in the URL is permanent and I think an expressive URL is better than a number.
  • The group name is not truly permanent because when you change the group name at any point, boom, all your previous URLs are now broken.

    The above group in my example was called "Energy and Emissions". I wanted to name it "Transportation Energy and Emissions", but that was way too long for the URL. And when I changed it to "TEE", it broke all the past URLs, that were based on Energy and Emissions.

    That is, this URL no longer works because I changed the group name:
    https://www.zotero.org/groups/energy_and_emissions
  • ah, that's not good at all. Dan, fcheslack?
  • I've never had a great answer for this. Fundamentally, none of these URLs can be expected to be permanent. Groups are made private (in various ways) or deleted. Items can also be deleted, or modified such that it's no longer the same item.

    I do feel that the human readable names in URLs provide value, and name changes should be the exception, not the rule.

    As you noted though, the version of the URL with the group ID does work, so that could be used as a form of permalink.
  • @fcheslack, thanks.

    I feel strongly about this and believe using group names is not the right way. In fact, it is frightening to know all your past URLs will become useless if you ever rename the group.

    The primary and absolutely inviolable function of a URL is that it must work as long as the said item exists on the web. Everything else is secondary. If the URL does not convey the group name, that's not a big deal at all. People will know what group it is when they go to the page. But if they can't get to the page, then the URL is worthless. The URL is already using a cryptic (but unique) placeholder for individual items.

    A shorter URL is also better than a longer, more descriptive, one. There's a reason why most services allow you to shorten the URL. I don't think people are looking to "learn" from a URL. They just want it to work and be short to type or fit on their screen and so on.

    Nobody expects URLs to work for items that do not exist. It makes no sense :) So, yes, if someone deletes a group or an item and then re-creates the exact same thing, nobody is going to argue the previous URL should work.

    Changes to group names might be rare, but not impossible and sometimes very justifiable. If a group grows (or shrinks) beyond the originally intended purpose, it is good to rename it to represent its true extent. Or, group members feel strongly that original name is not good.

    Manually substituting group number for name is not going to work. If my group has dozens or hundreds of members, how many do I "teach" this rule? It's bound to fail. If not at that level, then for other people who click on the URL, which gets redirected to show group name and then copy-paste from the browser for their purpose.
  • I understand that you're frustrated that the URL changed when you changed the group name, but let's attack that problem head-on by properly informing the group admin that the group name will be used for the URL and changes to the group name may change links. Human-readable/semantic URLs are preferred for good reason.

    If we wanted the URLs to be more stable, we could follow the practice of Facebook Groups or YouTube Channels & allow people to only set it once or twice, separately from the group name. Using cryptic numbers is not a good solution.
  • If we wanted the URLs to be more stable, we could follow the practice of Facebook Groups or YouTube Channels & allow people to only set it once or twice, separately from the group name.
    I think this is the way to go. It's also, e.g., what Wordpress does by default and it's what I would have expected. But yeah, as a minimum Zotero should display a strong warning when changing group names.

    Thinking more widely -- I think Zotero should consider allowing people to generate DOIs for public groups. There are several groups now that are massive annotated scholarly collections, and I think it'd be very appropriate to give them DOIs.
  • If we allowed a name change once or twice, we could also keep the old name reserved and generate redirects.
  • edited April 20, 2016
    I still think number is better than group name. The small benefit of human readable URL is outweighed by a robust URL. Groups evolve with time and name changes are not out of question. Also, a group name such as "Transportation Energy, Emissions, and Economics" is way too long for a URL.

    DOIs are not human readable. And the current system is in any case using cryptic strings for individual items.

    We are sacrificing a lot of flexibility and robustness and if I may say, elegance derived from having a short URL, for the meager benefit, if any, of human readable URL.
  • I don't think keeping URLs short is a priority — that's what copy and paste is for. Twitter shortens all URLs anyway, and seeing where the URL leads is useful.

    The best approach might be to do what Amazon and other sites do, which is to have an ID that determines the actual target and then have a more descriptive section after that doesn't actually matter:

    https://www.zotero.org/groups/12345/transportation_energy_emissions_and_economics

    Old URLs would then always work, and we could redirect to a URL with the current name.

    (These forums do this too, actually, though without the redirecting.)
  • I can live with anything that guarantees URLs will continue to work.
  • Dan, when can the system suggested by you be implemented? Now, next month, 3-6 months later, next year? Would be nice to have a sense of the time frame so I can keep group admins informed.
  • @danstillman Any update or future plan to make group URLs more stable (and not be broken completely if the group name is changed)?
  • @fcheslack would have to comment on that.
Sign In or Register to comment.